Giter VIP home page Giter VIP logo

connect-sdk-ios's Introduction

#Connect SDK iOS

Build Status Code Coverage CocoaPods Compatible Apache License, 2.0 Platform: iOS Twitter: @ConnectSDK

Connect SDK is an open source framework that connects your mobile apps with multiple TV platforms. Because most TV platforms support a variety of protocols, Connect SDK integrates and abstracts the discovery and connectivity between all supported protocols.

For more information, visit our website.

##Dependencies This project has the following dependencies, some of which require manual setup. If you would like to use a version of the SDK which has no manual setup, consider using the lite version of the SDK.

##Including Connect SDK in your app ###Using CocoaPods

  1. Add pod "ConnectSDK" to your Podfile
  2. Run pod install
  3. Open the workspace file and run your project

Important: Unfortunately, Amazon Fling SDK is not distributed via CocoaPods, so we cannot include its support in a subspec in an automated way. If you need it, please use the source ConnectSDK project directly.

You can use pod "ConnectSDK/Core" to get the lite version.

###Without CocoaPods

  1. Clone the repository (git clone https://github.com/ConnectSDK/Connect-SDK-iOS.git)
  2. Set up the submodules by running the following command (in the Connect-SDK-iOS/ directory in this example): git submodule update --init
  3. Open your project in Xcode
  4. Locate the Connect SDK Xcode project in Finder
  5. Drag the Connect SDK Xcode project (ConnectSDK.xcodeproj) into your project's Xcode library
  6. Navigate to your target's settings screen, then navigate to the "Build Phases" tab
  7. Add the following in the "Link Binary With Libraries" section:
  • libConnectSDK.a
  • libz.dylib
  • libicucore.dylib
  1. Navigate to the "Build Settings" tab and add -ObjC to your target's "Other Linker Flags"
  2. Follow the setup instructions for the service submodules:

###Include Strings File for Localization (optional)

  1. Locate the Connect SDK Xcode project in the Finder
  2. Drag the ConnectSDKStrings folder into your project's library
  3. You may make whatever changes you would like to the values and the SDK will use your strings file

Tests

Connect SDK has tests for some parts of the code, and we are continuing to increase the test coverage. There are currently three types of tests:

Type Target & Scheme Frameworks used Uses network Fast Reliable
Unit tests ConnectSDKTests OCMock, OHHTTPStubs, XCTest - + +
Integration tests ConnectSDKIntegrationTests Expecta, OCMock, Specta - + +
Acceptance (aka End-To-End) tests ConnectSDKAcceptanceTests Expecta, OCMock, Specta + - ±
  • Unit tests are for small components and usually test one class/method. They use mocks to inject the dependencies.

  • Integration tests verify the behavior of the whole Connect SDK, but without external environment (network and devices), so that they can be reliable and fast.

  • Acceptance tests verify the end-to-end behavior of Connect SDK and real devices, so they won't work out of the box in a different environment. Some acceptance tests also expect certain properties of those devices, such as name or IP address, which should be altered to match your particular setup.

The required third-party test frameworks are already pre-built and included in the core submodule.

All of the test targets are compiled when the main ConnectSDK scheme is built, but only the unit tests are setup to run when testing the scheme. The other tests can be run by selecting the corresponding scheme.

##Limitations/Caveats

###Subtitles

  • DLNA service supports SRT format only. Since there is no official specification for them, subtitles may not work on all DLNA-compatible devices. This feature has been tested and works on LG WebOS and Netcast TVs.
  • Netcast service supports SRT format only, through DLNA.
  • Google Cast service supports WebVTT format only. Servers providing subtitles and media files should support CORS headers (unless they are of the same origin). The simplest change is to send this HTTP response header for your files: Access-Control-Allow-Origin: *. More information is here: https://developers.google.com/cast/docs/ios_sender#cors-requirements.
  • FireTV service supports WebVTT format only. Subtitles on Fire TV are hidden by default. To display them, the user should manually pick one in the media player (click the "Options" button on the remote). The Fling SDK doesn't provide any way to make them appear remotely.
  • WebOS service supports WebVTT format only. Server providing subtitles should support CORS headers, similarly to Cast service's requirements.

##Contact

##Credits Connect SDK for iOS makes use of the following projects, some of which are open-source:

These projects are used in tests:

This public domain image is used in tests: The San Francisco peaks of flagstaff public domain image.

##License Copyright (c) 2013-2015 LG Electronics.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

connect-sdk-ios's People

Contributors

dung2le avatar henrylevak avatar hyojin89jung avatar iadnan avatar iheart2code avatar jonghenhan avatar lgcast-dev avatar oleksii-frolov avatar seokhee-lee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

connect-sdk-ios's Issues

Service type filtering should happen at the DeviceService level

Rather than having DiscoveryManager decide that a service is Netcast and not DLNA, we should have a static method on each DeviceService subclass that returns a confidence factor (0-100) for a given ServiceConfig & ServiceDescription from discovery. This will also fix some hacky things we are doing with simultaneous Netcast & DLNA.

Pressing join repeatedly will close web app

Probably an edge case but...

device 1- launch web app.
device 2 - immediately after launching web app on device 1, press 'join' many times quickly.

note: web app closes.
the key is to press the join button quickly before splash screen's bounce animation completes.

DLNA service is not being detected on Netcast TVs

DLNA is being detected on webOS TVs... on NC, I only see NC and DIAL. I killed the app multiple times, I waited over 60 seconds each time.

Also, using other DLNA enabled apps, I was able connect to the DLNA service as expected.

Fix few issues with DeviceStore

DeviceStore should not be creating ConnectableDevice objects on its own. It should just do the following:

  • return a string ID of a device for a given service UUID
  • return a strongly typed ServiceConfig object for a given service UUID

Devices aren't discovered after WiFi is toggled off and back on

Launch app with wifi connection, press connect - note all of the devices are listed.
Turn off wifi - press connect - note there are no devices listed (good)
Turn wifi back on, wait 30 seconds - note there still are no devices listed (bad)

Expected: Device should be rediscovered after wifi is turned back on.

DIAL service doesn't get removed after TV is turned off

Open device picker, wait till it discover the NC4 TV.. notice DIAL and NC services are discovered. Turn the NC4 TV off - notice NC service is gone but DIAL remains. Leave picker up for 2 minutes - notice DIAL remains.

I expect DIAL to be removed after 30 seconds (i think that is what we have it set to)

Chromecast remains in picker after it is disconnected

Low priority - but, when I connect to Chromecast and I pull the power cable out of it... within 5 seconds sampler app reacts but showing 'disconnected' state. After that, If I click on Connect - Chromecast is still there.. shouldn't we remove it because we know it disconnected? The device remained in picker for about 30 secs.

Cocoapods podspec

Do you guys plan on creating a podspec for this repo? It would be incredibly useful!

Crash after pairing with NC3 TV

Connect to Chromecast - beam photo. Disconnect - connect to fire tv, launch my dial app. Disconnect connect to NC3 TV, get the pin popup, enter a pin, pressed ok, app crashes.

Reproduced it twice. Had to uninstall app in between attempts.

Resume + Device store issue?

  1. Connect to webOS emulator using sampler. Turn display off and then back on (don't kill app). Note: when app resumes - sampler is disconnected from TV. This wasn't the case before.
  2. Press connect - select a webOS TV. Note the sampler remains in the device disconnected mode. Press Connect again, pick device, note it connects as expected.
    Expected: no matter what state the app is in, your should always connect to the selected device on first attempt.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.