Apple TV implementation with tvOS
This information helps you implement Apple TV with tvOS.
New Adobe Experience Platform Mobile SDK Release
Looking for information and documentation related to the Adobe Experience Platform Mobile SDK? Click here for our latest documentation.
As of September 2018, we released a new, major version of the SDK. These new Adobe Experience Platform Mobile SDKs are configurable through Experience Platform Launch.
- To get started, go to Adobe Experience Platform Launch.
- To see what is in the Experience Platform SDK repositories, go to Github: Adobe Experience Platform SDKs.
Overview
With Apple TV, you can now create applications to run in the native tvOS environment. You can create a native app by using several frameworks in iOS, or you can create your app by using XML templates and JavaScript.
Tip: tvOS support is available starting in
AdobeMobileLibrary
version 4.7.0.
Getting started
Tip: We assume that your project has a target that is an Apple TV app that is targeting tvOS. For more information, see tvOS.
Configure a native app for tvOS
Complete the following steps in your Xcode project:
-
Drag the AdobeMobileLibrary folder into your project.
-
Ensure that the
ADBMobileConfig.json
file is a member of your target. -
On the Build Phases tab of your tvOS app’s target, expand the Link Binary with Libraries section and add the following libraries:
AdobeMobileLibrary_TV.a
libsqlite3.0.tbd
SystemConfiguration.framework
For information, see the iOS documentation on iOS.
Configure a TVML/TVJS app for tvOS
-
Drag the
AdobeMobileLibrary
folder into your project. -
Ensure that the
ADBMobileConfig.json
file is a member of your target. -
On the Build Phases tab of your tvOS app’s target, expand the Link Binary with Libraries section and add the following libraries:
AdobeMobileLibrary_TV.a
libsqlite3.0.tbd
SystemConfiguration.framework
-
In the implementation file of your
TVApplicationControllerDelegate
class, import the SDK.#import "ADBMobile.h"
-
In the
application:didFinishLaunchWithOptions:
method of yourTVApplicationControllerDelegate
class, pass yourTVApplicationController
object to the SDK with theinstallTVMLHooks:
method.The Adobe SDK needs access to your app’s
TVApplicationController
to register itself into the JSContext of your app. This step allows you to call the native methods in the Adobe SDK from your JavaScript files.[ADBMobile installTVMLHooks:appController];
-
In your JavaScript files, use the
ADBMobile
object to access the native methods of the Adobe SDK.For a complete listing of the available methods, see TVJS Methods.