The Amazon Fire TV module extends Connect SDK to add Amazon Fire TV and Fire TV Stick devices using the Fling SDK. This repository is included as a submodule in the main project, and requires manual setup before the main project will compile.
This module acts a layer on top of Amazon’s Fling SDK, and requires the Fling SDK framework to function. It provides the following functionality:
- 
Media playback
 - 
Media control
 
Using Connect SDK for discovery/control of Fire TV devices will result in your app complying with the Amazon Fling SDK terms of service.
For more information about Connect SDK, visit the main repository.
- 
Download the Amazon Fling SDK from the Amazon website.
 - 
Unzip
ios-sdk/frameworks/AmazonFling.frameworkandios-sdk/frameworks/third_party_framework/Bolts.frameworkinto themodules/firetv/Frameworks/directory. - 
In your project: link
AmazonFling.framework,Bolts.framework,libc++.dylib, andAdSupport.frameworkwith your application target:- 
either drag them from the
ConnectSDKproject into your project’sFrameworksgroup and then add them to your target; - 
or go to your project settings, select the application target, "Build Phases" tab, in "Link Binary With Libraries" section click "+", then "Add Other…", and select
AmazonFling.frameworkandBolts.frameworkfiles; then click "+" and add systemlibc++.dylibandAdSupport.frameworkfiles. 
 - 
 
- 
Add this repository as a submodule into the Connect SDK Lite project, e.g.:
git submodule add https://github.com/ConnectSDK/Connect-SDK-iOS-FireTV.git firetv
 - 
Add this directory to the Connect SDK Lite Xcode project (
ConnectSDKtarget). - 
Amend the target memberships:
- 
Change the target membership of
*.mfiles inFireTVTests/directory fromConnectSDKtoConnectSDKTests. - 
Change the target membership of
*.mfiles inFireTVIntegrationTests/directory fromConnectSDKtoConnectSDKIntegrationTests. - 
Remove the
XCTestCase+TaskTests.hfile from theConnectSDKtarget. - 
In the
ConnectSDKtarget’sHeadersbuild phases, move allFireTV*headers fromProjecttoPublicsection. 
 - 
 - 
Download the Amazon Fling SDK from the Amazon website.
 - 
Unzip
ios-sdk/frameworks/AmazonFling.frameworkandios-sdk/frameworks/third_party_framework/Bolts.frameworkinto themodules/firetv/Frameworks/directory. - 
Add the
AmazonFling.frameworkandBolts.frameworkto the Xcode project (ConnectSDK,ConnectSDKTests, andConnectSDKIntegrationTeststargets). - 
Link
libc++.dylibandAdSupport.frameworkwithConnectSDKTests,ConnectSDKIntegrationTests, and your application targets. - 
Add a reference to the
FireTVServiceandFireTVDiscoveryProviderclasses in theConnectSDKDefaultPlatforms.hfile. 
- 
Play state subscription: currently,
FireTVService’s `-[MediaControl subscribePlayStateWithSuccess:failure:]only supports one subscription, that is this method allows adding multiple handlers, but the returned object is the same, so calling-unsubscribewill unsubscribe all the handlers. - 
Stopping discovery: due to the specifics of the Amazon Fling SDK, stopping the discovery provider (via
-[DiscoveryManager stopDiscovery]) will remove all found Fire TV devices! The Fling SDK’s discovery part is required forFireTVServiceto work properly. - 
FireTV devices and DIAL: Amazon Fling SDK doesn’t provide the IP address of a device, but a unique identifier instead. However, the DIAL device description doesn’t include that identifier, so Connect SDK is unable to merge those two services in the same
ConnectableDeviceat this point. When using bothFireTVServiceandDIALService, you will get two differentConnectableDeviceobjects with one of the services, representing the same physical FireTV device. - 
FireTV service supports
WebVTTformat 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. 
Copyright (c) 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
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.