/AmazonFling

Easily integrate the Amazon Fling SDK to discover and control your FireTV in your app

Primary LanguageObjective-CMIT LicenseMIT

AmazonFling

UPDATE: Moved to gitlab (https://gitlab.com/crelies/AmazonFling)

Easily integrate the Amazon Fling SDK to discover and control your FireTV in your app

Version Swift4 Platform License

Example

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.

Requirements

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.

Installation

AmazonFling is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'AmazonFling'

Changelog

Amazon Fling SDK Release Notes

Author

Christian Elies, chris.elies13@gmail.com

License

AmazonFling is available under the MIT license. See the LICENSE file for more info.