Datazoom is a high-availability real-time data collection solution. This document summarizes how to integrate the tvOS Media Player with the Datazoom platform.
- Login to Datazoom here: https://app.datazoom.io
- Add a Collector as indicated here: How to add a Collector
- Copy the
config keythat was created at the end of the process
Click the icon indicated below to copy the Configuration Key
You will see this message:
4. Replace the
<configuration id from Datazoom> in Datazoom's
DZNativeCollector.framework file with the Key you copied above.
5. Replace the
<url given by Datazoom> with
6. Replace the
<AVPlayer Object> with your
The DZ_Adapter_tvOS_Native.xcframework file should be downloaded from Here.
The DZ_Collector_tvOS.xcframework file should be downloaded from Here.
Drag and drop the downloaded frameworks into your Xcode project. Drag the file to the files inspector on the left side of Xcode.
Make sure you check the box "Copy items" in the popup menu that displays while you drag and drop the file.
In selected Xcode target, go to the General tab and scroll down to Frameworks, Libraries and Embedded Content (Embedded Binaries in older Xcode versions).
Make sure that the framework added in the above step is present. If not present, add the framework by clicking the "+" button available at the same section. Also, make sure that Embed option is set to Embed & Sign.
Steps for Swift Language based Applications:
After including the framework file, open the ViewController/View file, where the AVPlayer(native player) is included.
Import the framework using the following command:
Initialize the framework by passing along the 'Configuration ID', and player instance:
Run the app and observe the events captured in a Connector, data corresponding to OTT/tvOS in Platform, refers to the events tracked from your OTT/tvOS device.
To send Custom events and/or Custom metadata to Datazoom SDK we can use following methods:
Change "Some custom event" and "Some custom metadata" to any text or variable you want to send to collector service.
To send just Custom metadata to Datazoom SDK we can use following method:
Steps for ObjectiveC Language based Applications:
After including the framework file, Create a bridging header file, to allow interoperability of languages.
open the ViewController/View file, where the AVPlayer(native player) is included.
Import the following:
Initialize the swift class in the .h file.
In the .m file, allocate using:
Run the app and observe the events captured in a Connector, data corresponding to OTT/tvOS in Platform, refers to the events tracked from your tvOS device
A demo application that shows the usage of this framework is available Here. This can be used to test the DZ_collector_tvOS and DZ_Adapter_tvOS_Native.xcframework