UPDATE: Moved to gitlab (https://gitlab.com/crelies/AmazonFling)
Easily integrate the Amazon Fling SDK to discover and control your FireTV in your app
Import AmazonFling and start using the SDK:
import AmazonFling
import UIKit
final class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let discoveryController = DiscoveryController()
discoveryController.searchPlayer(withId: "amzn.thin.pl", andListener: self)
}
}
extension ViewController: DiscoveryListener {
func deviceDiscovered(_ device: RemoteMediaPlayer!) {
print("Discovered device [\(device)]")
}
func deviceLost(_ device: RemoteMediaPlayer!) {
print("Lost device [\(device)]")
}
func discoveryFailure() {
print("Discovery failed")
}
}
To run the example project, clone the repo, and run pod install
from the Example directory first.
You need to install git lfs
because the Amazon Fling binary is too large for a normal git repository. You can do this via Homebrew using brew install git-lfs
. For more information visit Git LFS.
AmazonFling is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'AmazonFling'
Amazon Fling SDK Release Notes
Christian Elies, chris.elies13@gmail.com
AmazonFling is available under the MIT license. See the LICENSE file for more info.