<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nielsentest.mywikis.net/w/index.php?action=history&amp;feed=atom&amp;title=DCR_KSA_Video_iOS_SDK</id>
	<title>DCR KSA Video iOS SDK - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nielsentest.mywikis.net/w/index.php?action=history&amp;feed=atom&amp;title=DCR_KSA_Video_iOS_SDK"/>
	<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_KSA_Video_iOS_SDK&amp;action=history"/>
	<updated>2026-04-08T20:57:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_KSA_Video_iOS_SDK&amp;diff=6456&amp;oldid=prev</id>
		<title>NickParrucci at 12:14, 20 July 2023</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_KSA_Video_iOS_SDK&amp;diff=6456&amp;oldid=prev"/>
		<updated>2023-07-20T12:14:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:14, 20 July 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l28&quot;&gt;Line 28:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 28:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Special Note for Static Framework ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Special Note for Static Framework ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Starting from 8.2.0.0 release framework is build from the mixed (swift + objc) source &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;codse&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Starting from 8.2.0.0 release framework is build from the mixed (swift + objc) source &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;code&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If [[iOS_Static_Framework_Setup|static (xc)framework is integrated additional settings]] should be applied to fix build or runtime issues.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If [[iOS_Static_Framework_Setup|static (xc)framework is integrated additional settings]] should be applied to fix build or runtime issues.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>NickParrucci</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_KSA_Video_iOS_SDK&amp;diff=6031&amp;oldid=prev</id>
		<title>WilsonQuispe: /* Create Content Metadata */</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_KSA_Video_iOS_SDK&amp;diff=6031&amp;oldid=prev"/>
		<updated>2022-10-27T13:53:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Create Content Metadata&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:53, 27 October 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l231&quot;&gt;Line 231:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 231:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| title || name of program (100 character limit) || custom || Yes&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| title || name of program (100 character limit) || custom || Yes&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| length || length of content in seconds || &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;code&amp;gt;&lt;/del&gt;seconds&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/code&amp;gt; &lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0 &lt;/del&gt;for live stream) || Yes&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| length || length of content in seconds || &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Length of content in &lt;/ins&gt;seconds (&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;86400 seconds &lt;/ins&gt;for live stream &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(24/7). For Event-Live streams planned length. For VoD video length&lt;/ins&gt;) || Yes&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| airdate || the airdate in the linear TV || YYYYMMDD HH24:MI:SS || Yes&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| airdate || the airdate in the linear TV || YYYYMMDD HH24:MI:SS || Yes&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>WilsonQuispe</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_KSA_Video_iOS_SDK&amp;diff=5880&amp;oldid=prev</id>
		<title>ColinBrown: Created page with &quot;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|International DCR}}  {{CurrentBreadcrumb}} Category:Digital __TOC__   == Overview == The Nielsen SDK is one of the mult...&quot;</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_KSA_Video_iOS_SDK&amp;diff=5880&amp;oldid=prev"/>
		<updated>2022-07-15T23:37:34Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|International DCR}}  {{CurrentBreadcrumb}} &lt;a href=&quot;/wiki/Category:Digital&quot; title=&quot;Category:Digital&quot;&gt;Category:Digital&lt;/a&gt; __TOC__   == Overview == The Nielsen SDK is one of the mult...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|International DCR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The Nielsen SDK is one of the multiple framework SDKs that Nielsen provides to enable measuring linear (live) and on-demand TV viewing using TVs, mobile devices, etc.&lt;br /&gt;
The App SDK is the framework for mobile application developers to integrate Nielsen Measurement into their media player applications. It supports a variety of Nielsen Measurement Products like Digital Content Ratings (DCR), and [[Digital Ad Ratings]] (DAR). Nielsen SDKs are also equipped to measure static content and can track key life cycle events of an application like:&lt;br /&gt;
*Application launch events and how long app was running&lt;br /&gt;
{{iOS_SpecialNotes_for_iOS14}}&lt;br /&gt;
&lt;br /&gt;
{{iOS_Prerequisites_and_Implementation_Overview}}&lt;br /&gt;
&lt;br /&gt;
== Setting up your  Development Environment  ==&lt;br /&gt;
Prior to SDK Version 6.2.0.0 the  IOS framework has been distributed as a static library packaged into framework bundle format. Apple recommends to use dynamic framework, it has some benefits over static libraries like less executable file size of an app, faster startup time and native support in xCode IDE. Nielsen AppSDK has been transformed into dynamic framework in this release ([[iOS_Static_Framework_Setup|static framework]] is still available).&lt;br /&gt;
&lt;br /&gt;
If migrating from the static library to this new dynamic framework, once implemented, unless your specific application requires, you can remove the following Frameworks that were once required:&amp;lt;code&amp;gt; [AdSupport, JavascriptCore, SystemConfiguration, Security, AVFoundation, libc++] &amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''Dynamic framework''' is created as a fat framework. It means that it contains slices required for devices (armv7, arm64) as well as slices required for simulators (i386, x86_64). Simulator slices are needed to let clients build and debug their app on the simulators, but they should be removed before sending the app to the AppStore. The example of the shell script that should be added as a Run Script phase in the application can be [[DCR_Video_iOS_SDK#Removing_Simulators_.28Dynamic_Framework_Only.29|found below]].&lt;br /&gt;
&lt;br /&gt;
'''[[DCR_Video_iOS_SDK_xcframework|XCFramework]]''' is solution for the problems described above Apple recommends to use XCFrameworks. In XCFramework, we no longer build a single framework with multiple architectures. Instead, we build one small framework for each combination of architecture and target and store it in its own folder. The top-level XCFramework folder have folders like ios-arm64, ios-arm64-simulator, etc. Each of these folders is its own framework, complete with headers, modules, and binary.&lt;br /&gt;
&lt;br /&gt;
=== Configuring Xcode Development Environment ===&lt;br /&gt;
Starting with SDK version 6.0.0.0, the Nielsen App SDK is compatible with Apple iOS versions 8.0 and above.  In addition, when using the dynamic framework,  all the required frameworks are linked automatically as the are needed.  More details can be found here: https://stackoverflow.com/questions/24902787/dont-we-need-to-link-framework-to-xcode-project-anymore&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note''': All communications between the SDK and the Census (Collection Facility) use HTTPS.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Special Note for Static Framework ===&lt;br /&gt;
Starting from 8.2.0.0 release framework is build from the mixed (swift + objc) source codse.&lt;br /&gt;
If [[iOS_Static_Framework_Setup|static (xc)framework is integrated additional settings]] should be applied to fix build or runtime issues.&lt;br /&gt;
&lt;br /&gt;
=== Download Framework ===&lt;br /&gt;
The first step is to download and copy the [[Special:Downloads|NielsenAppApi.framework]] bundle to the app project directory. (''Not required if using CocaPods'')&lt;br /&gt;
&lt;br /&gt;
=== Add Framework ===&lt;br /&gt;
In the General tab for app configuration add NielsenAppApi.framework in the list of Embedded Binaries.  (''Not required if using CocaPods'')&lt;br /&gt;
&lt;br /&gt;
=== Add Path ===&lt;br /&gt;
Add path to the NielsenAppApi.framework in the Framework Search Paths build setting.  (''Not required if using CocaPods'')&lt;br /&gt;
&lt;br /&gt;
=== Import Framework ===&lt;br /&gt;
Add NielsenAppApi.framework module in the source file of your app:&lt;br /&gt;
&lt;br /&gt;
==== Using Swift ====&lt;br /&gt;
Add the following:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;swift&amp;quot;&amp;gt;&lt;br /&gt;
import NielsenAppApi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using Objective-C ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang =&amp;quot;objective-c&amp;quot;&amp;gt;&lt;br /&gt;
@import NielsenAppApi;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== xCode 12 building errors ====&lt;br /&gt;
Developers who uses &amp;quot;fat&amp;quot; framework in their apps started reporting the following error that they get building the app in xCode 12.3+:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Building for iOS Simulator, but the linked and embedded framework 'MyFramework.framework' was built for iOS + iOS Simulator.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
The binary framework contains different code for the same architecture in multiple places, and Xcode doesn’t know how to handle it. There is workaround that people recommend to use in such cases:&lt;br /&gt;
* https://stackoverflow.com/questions/63267897/building-for-ios-simulator-but-the-linked-framework-framework-was-built&lt;br /&gt;
* https://stackoverflow.com/questions/63932158/xcode12-issus-ld-building-for-ios-simulator-but-linking-in-object-file-built&lt;br /&gt;
&lt;br /&gt;
==== IPA processing failure ====&lt;br /&gt;
&amp;lt;code&amp;gt;Assertion failed: Expected 4 archs in otool output:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The error above is due to the &amp;quot;fat&amp;quot; (simulator+device) framework which will not appear if you have not enabled Bitcode.  To build your app with full Bitcode support, it is recommended that you use a [[DCR_Video_iOS_SDK_xcframework|XCFramework]] to avoid the 4 archs in otool output message.&lt;br /&gt;
&lt;br /&gt;
== Create SDK Instance ==&lt;br /&gt;
The latest version of the Nielsen App SDK allows instantiating multiple instances of the SDK object when needed, which can then be used simultaneously. '''For the general use case where only one video is played at the same time in the App, a single instance of SDK object can then be used to play back and measure all watched streams one after another.'''&lt;br /&gt;
&lt;br /&gt;
The following table contains the list of arguments that can be passed via the AppInfo JSON schema.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter / Argument !! Description !! Source !! Required/Obligatory? !! Example&lt;br /&gt;
|-&lt;br /&gt;
| appid || Unique id for the application assigned by Nielsen. It is GUID data type.|| Nielsen-specified || Yes || &amp;quot;PXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| appname || Name of the application || Client-defined || Yes || &amp;quot;Nielsen Sample App&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| appversion || Current version of the app used || Client-defined || Yes || &amp;quot;1.0.4&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Nielsen collection facility to which the SDK should connect.&lt;br /&gt;
|| Nielsen-specified || Yes || &amp;quot;ksa&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| nol_devDebug || Enables Nielsen console logging. Only required for testing&lt;br /&gt;
|| Nielsen-specified || Optional || &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debug flag for development environment ==&lt;br /&gt;
Player application developers / integrators can use Debug flag to check whether an App SDK API call made is successful. To activate the Debug flag,&lt;br /&gt;
Pass the argument &amp;lt;code&amp;gt;@&amp;quot;nol_devDebug&amp;quot;:@&amp;quot;DEBUG&amp;quot;&amp;lt;/code&amp;gt;, in the JSON string.&lt;br /&gt;
&lt;br /&gt;
* '''DEBUG''': Debug logs, used by the developers to debug more complex issues.&lt;br /&gt;
&lt;br /&gt;
Once the flag is active, it logs each API call made and the data passed. The log created by this flag is minimal.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note''': DO NOT activate the Debug flag in a production environment.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Sample SDK Initialization Code ====&lt;br /&gt;
&lt;br /&gt;
Initialize the Nielsen App object within the viewDidLoad view controller delegate method using initWithAppInfo:delegate:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;If App SDK is initialized using init or new methods, it will ignore the API calls resulting in no measurement. The SDK will not return any errors.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Using Objective-C=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;&lt;br /&gt;
#import &amp;quot;NlsAppApiFactory.h&amp;quot;&lt;br /&gt;
#import &amp;lt;NielsenAppApi/NielsenAppApi.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
@implementation NlsAppApiFactory&lt;br /&gt;
&lt;br /&gt;
+ (NielsenAppApi *)createNielsenAppApiWithDelegate:(id&amp;lt;NielsenAppApiDelegate&amp;gt;)delegate;&lt;br /&gt;
{&lt;br /&gt;
    NSDictionary *appInformation = @{&lt;br /&gt;
                                     @&amp;quot;appid&amp;quot;: &amp;quot;PXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;,&lt;br /&gt;
                                     @&amp;quot;appversion&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
                                     @&amp;quot;appname&amp;quot;: &amp;quot;app name here&amp;quot;,&lt;br /&gt;
                                     @&amp;quot;sfcode&amp;quot;: &amp;quot;ksa&amp;quot;,&lt;br /&gt;
                                     @&amp;quot;nol_devDebug&amp;quot;: @&amp;quot;DEBUG&amp;quot;&lt;br /&gt;
                                    };&lt;br /&gt;
    return [[NielsenAppApi alloc] initWithAppInfo:appInformation delegate:delegate];&lt;br /&gt;
}&lt;br /&gt;
@end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following would be the &amp;lt;code&amp;gt;NlsAppApiFactory.h&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;&lt;br /&gt;
#import &amp;lt;Foundation/Foundation.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
@class NielsenAppApi;&lt;br /&gt;
@protocol NielsenAppApiDeligate;&lt;br /&gt;
&lt;br /&gt;
@interface NlsAppApiFactory : NSObject&lt;br /&gt;
&lt;br /&gt;
+ (NielsenAppAPI *) createNielsenAppApiWithDelegate:(id&amp;lt;NielsenAppApiDelegate&amp;gt;)delegate;&lt;br /&gt;
&lt;br /&gt;
@end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Using Swift =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;NielsenInit.swift&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;swift&amp;quot;&amp;gt;&lt;br /&gt;
class NielsenInit: NSObject {&lt;br /&gt;
    class func createNielsenAppApi(delegate: NielsenAppApiDelegate) -&amp;gt; NielsenAppApi?{&lt;br /&gt;
    let appInformation:[String: String] = [&lt;br /&gt;
            &amp;quot;appid&amp;quot;: &amp;quot;PXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;,&lt;br /&gt;
            &amp;quot;appversion&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
            &amp;quot;appname&amp;quot;: &amp;quot;app name here&amp;quot;,&lt;br /&gt;
            &amp;quot;sfcode&amp;quot;: &amp;quot;ksa&amp;quot;,&lt;br /&gt;
            &amp;quot;nol_devDebug&amp;quot;: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
        ]&lt;br /&gt;
        return NielsenAppApi(appInfo:appInformation, delegate:delegate)&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sample code using AVPlayer.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;ViewController.swift&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;swift&amp;quot;&amp;gt;&lt;br /&gt;
class ViewController: UIViewController, NielsenAppApiDelegate, AVPictureInPictureControllerDelegate, CLLocationManagerDelegate  {&lt;br /&gt;
&lt;br /&gt;
    let avPlayerViewController = AVPlayerViewController()&lt;br /&gt;
    var avPlayer:AVPlayer?&lt;br /&gt;
    var nielsenAppApi: NielsenAppApi!&lt;br /&gt;
&lt;br /&gt;
  override func viewDidLoad() {&lt;br /&gt;
        super.viewDidLoad()&lt;br /&gt;
&lt;br /&gt;
        self.nielsenAppApi = NielsenInit.createNielsenAppApi(delegate: self)&lt;br /&gt;
        NSLog(&amp;quot;Nielsen SDK initialized&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
            }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== APP SDK Error &amp;amp; Event Codes ====&lt;br /&gt;
To view the Error and Event codes for iOS and Android, please review the [[APP SDK Event Codes|App SDK Event Code]] Reference page.&lt;br /&gt;
&lt;br /&gt;
==== Life cycle of SDK instance ====&lt;br /&gt;
The life cycle of SDK instance includes four general states:&lt;br /&gt;
# '''Initial state''' – The SDK is not initialized and hence, not ready to process playing information. Once the SDK is moved out of this state, it needs instantiation of the new SDK instance in order to get the instance in the '''Initial state'''.&lt;br /&gt;
# '''Idle state''' – The SDK is initialized and is ready to process playing information. Once Initialized, the SDK instance is not processing any data, but is listening for the play event to occur.&lt;br /&gt;
# '''Processing state''' – The SDK instance is processing playing information. API calls &amp;quot;play&amp;quot; and &amp;quot;loadMetadata&amp;quot; move the SDK instance into this state. In this state, the SDK instance will be able to process the API calls (see below)&lt;br /&gt;
# '''Disabled state''' – The SDK instance is disabled and is not processing playing information. SDK instance moves into this state in one of the following scenarios.&lt;br /&gt;
## Initialization fails&lt;br /&gt;
## &amp;lt;code&amp;gt;appDisableApi&amp;lt;/code&amp;gt; is called&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;&lt;br /&gt;
@property (assign) BOOL appDisableApi;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Create Metadata Objects ==&lt;br /&gt;
The parameters passed must be either a JSON formatted NSString or a NSDictionary object. The JSON passed in the SDK must be well-formed.&lt;br /&gt;
* NSDictionary object&lt;br /&gt;
** If an object of unexpected type is passed to the method, the error message will be logged.&lt;br /&gt;
** If string has invalid JSON format, the error message will be logged.&lt;br /&gt;
* JSON value must be string value.&lt;br /&gt;
** This includes boolean and numeric values. For example, a value of true should be represented with &amp;quot;true&amp;quot;, number value 123 should be &amp;quot;123&amp;quot;.&lt;br /&gt;
** All the Variable Names like appid, appname, dataSrc, title, type etc. are case-sensitive. Use the correct variable name as specified in the documentation.&lt;br /&gt;
* JSON string can be prepared using either raw NSString or serialized NSDictionary.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create channelName Metadata ===&lt;br /&gt;
channelName should remain constant throughout the completion of an episode or live stream.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !!	Values	 !! Required&lt;br /&gt;
|-&lt;br /&gt;
| channelName	|| Any string representing the channel/stream	|| custom	|| Yes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Create Content Metadata ===&lt;br /&gt;
Content metadata should remain constant throughout the entirety of an episode/clip including when ads play.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys	!! Description	!! Values	!! Required&lt;br /&gt;
|-&lt;br /&gt;
| type 	|| type of asset || &amp;lt;code&amp;gt;'content'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to asset (32 Character limit) || custom (no [[Special Characters|Special Characters]]) || Yes&lt;br /&gt;
|-&lt;br /&gt;
| program || name of program (100 character limit) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| title || name of program (100 character limit) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| length || length of content in seconds || &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt; (0 for live stream) || Yes&lt;br /&gt;
|-&lt;br /&gt;
| airdate || the airdate in the linear TV || YYYYMMDD HH24:MI:SS || Yes&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode || full episode flag || &amp;lt;code&amp;gt;'y'&amp;lt;/code&amp;gt;- full episode, &amp;lt;code&amp;gt;'n'&amp;lt;/code&amp;gt;- non full episode || Yes&lt;br /&gt;
|-&lt;br /&gt;
| adloadtype || type of ad load:&lt;br /&gt;
*&amp;lt;code&amp;gt;'1'&amp;lt;/code&amp;gt; Linear – matches TV ad load&lt;br /&gt;
*&amp;lt;code&amp;gt;'2'&amp;lt;/code&amp;gt; Dynamic – Dynamic Ad Insertion (DAI)&lt;br /&gt;
|| &amp;lt;code&amp;gt;'2'&amp;lt;/code&amp;gt; - DCR measures content with dynamic ads &lt;br /&gt;
|| Yes&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Create Ad Metadata ===&lt;br /&gt;
The Ad Metadata (if applicable) should be passed for each individual ad.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys	!! Description	!! Values	!! Required&lt;br /&gt;
|-&lt;br /&gt;
| type 	|| type of Ad	||  &amp;lt;code&amp;gt;'preroll'&amp;lt;/code&amp;gt;,  &amp;lt;code&amp;gt;'midroll'&amp;lt;/code&amp;gt;,  &amp;lt;code&amp;gt;'postroll'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid ||	unique ID assigned to Ad	|| custom (no [[Special Characters|Special Characters]]) || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' All metadata values should be passed as UTF-8 strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; URL Character Limit: There is a URL character limit of 2K characters due to browser limitations. Exceeding this value could impair data delivery on particular browsers. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MetaData Example ===&lt;br /&gt;
&lt;br /&gt;
==== Using Objective-C ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;&lt;br /&gt;
NSDictionary  *channelInfo = @&lt;br /&gt;
{&lt;br /&gt;
    @&amp;quot;channelName&amp;quot;:@&amp;quot;My Channel Name 1&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NSDictionary *contentMetadata = @&lt;br /&gt;
  {&lt;br /&gt;
    @ &amp;quot;type&amp;quot;: @ &amp;quot;content&amp;quot;,&lt;br /&gt;
    @ &amp;quot;assetid&amp;quot;: @ &amp;quot;88675545&amp;quot;,&lt;br /&gt;
    @ &amp;quot;title&amp;quot;: @ &amp;quot;Program S3, EP1&amp;quot;,&lt;br /&gt;
    @ &amp;quot;isfullepisode&amp;quot;: @ &amp;quot;y&amp;quot;,  &lt;br /&gt;
    @ &amp;quot;program&amp;quot;: @ &amp;quot;Program Name&amp;quot;,&lt;br /&gt;
    @ &amp;quot;length&amp;quot;: @ &amp;quot;3600&amp;quot;,&lt;br /&gt;
    @ &amp;quot;airdate&amp;quot;: @ &amp;quot;20200321 10:05:00&amp;quot;,&lt;br /&gt;
    @ &amp;quot;adloadtype&amp;quot;: @ &amp;quot;2&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
NSDictionary *adMetadata = @&lt;br /&gt;
  {&lt;br /&gt;
    @&amp;quot;type&amp;quot; : &amp;quot;postroll&amp;quot;,&lt;br /&gt;
    @&amp;quot;assetid&amp;quot; : &amp;quot;AD-ID123&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using Swift ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;swift&amp;quot;&amp;gt;&lt;br /&gt;
     let channelInfo = [&lt;br /&gt;
        &amp;quot;channelName&amp;quot;: &amp;quot;My Channel Name 1&amp;quot;,&lt;br /&gt;
     ]&lt;br /&gt;
&lt;br /&gt;
     let contentMetadata = [&lt;br /&gt;
         &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
         &amp;quot;assetid&amp;quot;: &amp;quot;88675545&amp;quot;,&lt;br /&gt;
         &amp;quot;title&amp;quot;: &amp;quot;Program S3, EP1&amp;quot;,&lt;br /&gt;
         &amp;quot;isfullepisode&amp;quot;:&amp;quot;y&amp;quot;,&lt;br /&gt;
         &amp;quot;adloadtype&amp;quot;:&amp;quot;2&amp;quot;,&lt;br /&gt;
         &amp;quot;program&amp;quot;:&amp;quot;Program Name&amp;quot;,&lt;br /&gt;
         &amp;quot;length&amp;quot;:&amp;quot;3600&amp;quot;, &lt;br /&gt;
         &amp;quot;airdate&amp;quot;:&amp;quot;20171020 10:05:00&amp;quot;&lt;br /&gt;
     ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    let adMetadata = [&lt;br /&gt;
        &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;,&lt;br /&gt;
        &amp;quot;assetid&amp;quot; : &amp;quot;ad123&amp;quot;&lt;br /&gt;
    ]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Start the Measurement ==&lt;br /&gt;
&lt;br /&gt;
=== Overview of SDK API Calls ===&lt;br /&gt;
&lt;br /&gt;
==== play ====&lt;br /&gt;
The play method prepares the SDK for reporting once an asset has loaded and playback has begun. Use play to pass the channel descriptor information through channelName parameter when the user taps the '''Play''' button on the player. Call play only when initially starting the video.&lt;br /&gt;
===== Using Objective-C =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;[self.nielsenAppApi play:channelInfo];&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===== Using Swift =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;swift&amp;quot;&amp;gt;self.nielsenAppApi?.play(channelInfo);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== loadMetadata ====&lt;br /&gt;
Needs to be called at the beginning of each asset, pass JSON object for relevant content or ad. Make sure to pass as 1st loadMetadata for content at the begining of playlist - see below API call sequence examples.&lt;br /&gt;
===== Using Objective-C =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;[self.nielsenAppApi loadMetadata:metadataDict];&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===== Using Swift =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;swift&amp;quot;&amp;gt;self.nielsenAppApi?.loadMetadata(metadataDict)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== playheadPosition ====&lt;br /&gt;
Pass playhead position every second during playback. for VOD: pass current position in seconds. for Live: current Unix timestamp (seconds since Jan-1-1970 UTC) - if it is possible to seek back in Live content, then pass related Unix time (not current). Pass whole number that increments only by 1 like 1,2,3..&lt;br /&gt;
===== Using Objective-C =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;&lt;br /&gt;
[self.nielsenAppApi playheadPosition:pos];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===== Using Swift =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;swift&amp;quot;&amp;gt;&lt;br /&gt;
self.nielsenAppApi?.playheadPosition(pos);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== stop ====&lt;br /&gt;
Call when&lt;br /&gt;
* ads complete playing&lt;br /&gt;
* when a user pauses playback&lt;br /&gt;
* upon any user interruption scenario - see bellow chapter Interruption scenario&lt;br /&gt;
===== Using Objective-C =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;[self.nielsenAppApi stop];&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===== Using Swift =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;swift&amp;quot;&amp;gt;self.nielsenAppApi?.stop;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== end ====&lt;br /&gt;
Call when the content asset completes playback.  Stops measurement progress.&lt;br /&gt;
===== Using Objective-C =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;[self.nielsenAppApi end];&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===== Using Swift =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;swift&amp;quot;&amp;gt;self.nielsenAppApi?.end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== API Call Sequence ===&lt;br /&gt;
==== Use Case 1: Content has no Ads ====&lt;br /&gt;
Call [[play()]] with channelName JSON as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
   &amp;quot;channelName&amp;quot;: &amp;quot;ChannelName&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[loadMetadata()]] with JSON metadata for content as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
  &amp;quot;assetid&amp;quot;: &amp;quot;vid345-67483&amp;quot;,&lt;br /&gt;
  &amp;quot;program&amp;quot;: &amp;quot;ProgramName&amp;quot;,&lt;br /&gt;
  &amp;quot;title&amp;quot;: &amp;quot;Program S3, EP1&amp;quot;,&lt;br /&gt;
  &amp;quot;length&amp;quot;: &amp;quot;3600&amp;quot;,&lt;br /&gt;
  ...&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[playheadPosition|playheadPosition()]] every one second until a pause.&lt;br /&gt;
Use the sample API sequence below as a reference to identify the specific events that need to be called during content playback without ads.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type !! Sample code !! Description&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Start of stream || &amp;lt;code&amp;gt;mAppSdk.play(channelName); &amp;lt;/code&amp;gt; || // channelName contains JSON metadata of channel/video name being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.loadMetadata(contentMetaDataObject);&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| Content || &amp;lt;code&amp;gt;mAppSdk.playheadPosition(playheadPosition);&amp;lt;/code&amp;gt; || // position is position of the playhead while the content is being played&lt;br /&gt;
|-&lt;br /&gt;
| End of Stream || &amp;lt;code&amp;gt;mAppSdk.end();&amp;lt;/code&amp;gt; || // Content playback is completed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Use Case 2: Content has Ads ====&lt;br /&gt;
Call [[play()]] with channelName JSON as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
   &amp;quot;channelName&amp;quot;: &amp;quot;ChannelName&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[loadMetadata()]] with JSON metadata for ad as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;,&lt;br /&gt;
   &amp;quot;assetid&amp;quot;: &amp;quot;ad_123&amp;quot;,&lt;br /&gt;
   ...&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: In case the individual ad details are not available, send ad pod (presence) details through the [[loadMetadata]] and playhead position through [[playheadPosition]].&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Call [[playheadPosition|playheadPosition()]] every one second until a pause / another [[loadMetadata()]] is called. Playhead should be passed for the entire duration of ad pod, if the ad pod details are passed as part of [[loadMetadata()]].&lt;br /&gt;
&lt;br /&gt;
The sample API sequence can be used as a reference to identify the specific events that need to be called during content and ad playback.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type !! Sample code !! Description&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Start of stream || &amp;lt;code&amp;gt;mAppSdk.play(channelName); &amp;lt;/code&amp;gt; || // channelName contains JSON metadata of channel/video name being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.loadMetadata(contentMetaDataObject);&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Preroll || &amp;lt;code&amp;gt;mAppSdk.loadMetadata(prerollMetadataObject);&amp;lt;/code&amp;gt; || // prerollMetadataObject contains the JSON metadata for the preroll ad&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.playheadPosition(playheadPosition);&amp;lt;/code&amp;gt; || // position is position of the playhead while the preroll ad is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.stop();&amp;lt;/code&amp;gt; || // Call stop after preroll occurs&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Content || &amp;lt;code&amp;gt;mAppSdk.loadMetadata(contentMetaDataObject);&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.setPlayheadPosition(playheadPosition);&amp;lt;/code&amp;gt; || // position is position of the playhead while the content is being played&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Midroll || &amp;lt;code&amp;gt;mAppSdk.loadMetadata(midrollMetaDataObject);&amp;lt;/code&amp;gt; || // midrollMetadataObject contains the JSON metadata for the midroll ad&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.playheadPosition(playheadPosition);&amp;lt;/code&amp;gt; || // position is position of the playhead while the midroll ad is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.stop();&amp;lt;/code&amp;gt; || // App moves to background(midroll pauses) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.loadMetadata(midrollMetaDataObject);&amp;lt;/code&amp;gt; || // App moves to foreground (midroll resumes) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.playheadPosition(playheadPosition);&amp;lt;/code&amp;gt; || // playheadPosition is position of the playhead while the midroll ad is being played &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.stop();&amp;lt;/code&amp;gt; || // Call stop after midroll occurs&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Content (End of stream) || &amp;lt;code&amp;gt;mAppSdk.loadMetadata(contentMetaDataObject);&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.playheadPosition(playheadPosition);&amp;lt;/code&amp;gt; || // position is position of the playhead while the content is being played&lt;br /&gt;
|-&lt;br /&gt;
| End of Stream || &amp;lt;code&amp;gt;mAppSdk.end();&amp;lt;/code&amp;gt; || // Call end() at the end of content&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Postroll || &amp;lt;code&amp;gt;mAppSdk.loadMetadata(postrollMetaDataObject);&amp;lt;/code&amp;gt; || // postrollMetadataObject contains the JSON metadata for the postroll ad&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.playheadPosition(playheadPosition);&amp;lt;/code&amp;gt; || // position is position of the playhead while the postroll ad is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.stop();&amp;lt;/code&amp;gt; || // Call stop after postroll occurs&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: Each Ad playhead should reset or begin from 0 at ad start. When content has resumed following an ad break, playhead position must continue from where previous content segment was left off.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Stop/Resume the Measurement for video Playback Interruptions ==&lt;br /&gt;
As part of integrating Nielsen App SDK with the player application, the Audio / Video app developer needs to handle the following possible interruption scenarios:&lt;br /&gt;
* Pause / Play&lt;br /&gt;
* Network Loss (Wi-Fi / Airplane / Cellular)&lt;br /&gt;
* Call Interrupt (SIM or Third-party Skype / Hangout call)&lt;br /&gt;
* Alarm Interrupt&lt;br /&gt;
* Content Buffering&lt;br /&gt;
* Device Lock / Unlock (Video players only, not for Audio players)&lt;br /&gt;
* App going in the Background/Foreground (Video players only, not for Audio players)&lt;br /&gt;
* Channel / Station Change Scenario&lt;br /&gt;
* Unplugging of headphone&lt;br /&gt;
In case of encountering one of the above interruptions, the player application needs to&lt;br /&gt;
* Call &amp;lt;code&amp;gt;stop&amp;lt;/code&amp;gt; immediately (except when content is buffering) and withhold sending playhead position.&lt;br /&gt;
* Once the playback resumes, start sending pings &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; for the new viewing session.&lt;br /&gt;
Please see the [[Digital Measurement FAQ]] for more details&lt;br /&gt;
&lt;br /&gt;
== Review SDK Integration Architecture Diagram ==&lt;br /&gt;
&lt;br /&gt;
=== For Content Playback ===&lt;br /&gt;
&lt;br /&gt;
[[File:nlsn-sdk-achitecture-diagram-content-v1.png||SDK Integration Architecture Diagram - Content]]&lt;br /&gt;
&lt;br /&gt;
=== For Ad Playback ===&lt;br /&gt;
[[File:nlsn-sdk-achitecture-diagram-ad-v1.png||SDK Integration Architecture Diagram - Ad]]&lt;br /&gt;
&lt;br /&gt;
{{iOS_NoID_Privacy_and_Opt-Out}}&lt;br /&gt;
&lt;br /&gt;
{{iOS_Airplay}}&lt;br /&gt;
== Test your player by yourself ==&lt;br /&gt;
=== Guide ===&lt;br /&gt;
1. Connect your PC and test device (tablet or phone) via same router.&amp;lt;br /&amp;gt;&lt;br /&gt;
2. PC side: run Proxy sw (like Charles) and get local IP&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Test device: modify Wifi setting to pass through Proxy IP from step 2.&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Test device: run your player, launch video&amp;lt;br /&amp;gt;&lt;br /&gt;
5. PC side: filter traffic by &amp;quot;nmrodam&amp;quot; and confirm presence of SDK pings&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example of SDK ping (https call) ===&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://secure-ksa.nmrodam.com/cgi-bin/gn?prd=dcr&amp;amp;ci=se-910685&amp;amp;ch=se-910685_c01_P&amp;amp;asn=defChnAsset&amp;amp;fp_id=a2nfmy17lyvkhlxqstvmgypqly90m1629966210&amp;amp;fp_cr_tm=1629966210&amp;amp;fp_acc_tm=1629966210&amp;amp;fp_emm_tm=1629966210&amp;amp;ve_id=20A7CFD5-9860-4256-A6CE-45C251F4C243&amp;amp;sessionId=yvx0rtsxydmaxueji8zgfzj0f2f1w1629966209&amp;amp;tl=&amp;amp;prv=1&amp;amp;c6=vc,c01&amp;amp;ca=se-910685_c01_51HERB1501&amp;amp;cg=Play%20%3E%20Webbtv%20%3E%20Nyheter&amp;amp;c13=asid,P3D8D326A-2DBC-486A-8FD8-9AF4452B2A41&amp;amp;c32=segA,NA&amp;amp;c33=segB,NA&amp;amp;c34=segC,NA&amp;amp;c15=apn,Aftonbladet&amp;amp;plugv=&amp;amp;playerv=&amp;amp;sup=1&amp;amp;segment2=&amp;amp;segment1=&amp;amp;forward=0&amp;amp;ad=1&amp;amp;cr=4_00_99_D1_00000&amp;amp;c9=devid,12b9377cbe7e5c94e8a70d9d23929523d14afa954793130f8a3959c7b849aca8&amp;amp;enc=true&amp;amp;c1=nuid,12b9377cbe7e5c94e8a70d9d23929523d14afa954793130f8a3959c7b849aca8&amp;amp;at=timer&amp;amp;rt=video&amp;amp;c16=sdkv,ai.8.1.0&amp;amp;c27=cln,15&amp;amp;crs=&amp;amp;lat=&amp;amp;lon=&amp;amp;c29=plid,16299662096458868&amp;amp;c30=bldv,ai.8.1.0.0_gsxaoni&amp;amp;st=dcr&amp;amp;c7=osgrp,&amp;amp;c8=devgrp,&amp;amp;c10=plt,&amp;amp;c40=adbid,&amp;amp;c14=osver,iOS14.6&amp;amp;c26=dmap,1&amp;amp;dd=&amp;amp;hrd=&amp;amp;wkd=&amp;amp;c35=adrsid,&amp;amp;c36=cref1,&amp;amp;c37=cref2,&amp;amp;c11=agg,1&amp;amp;c12=apv,5.47.83.0.25245&amp;amp;c51=adl,15&amp;amp;c52=noad,1&amp;amp;sd=15&amp;amp;pc=NA&amp;amp;c53=fef,n&amp;amp;c54=oad,&amp;amp;c55=cref3,&amp;amp;c57=adldf,2&amp;amp;ai=51HERB1501&amp;amp;c3=st,a&amp;amp;c64=starttm,1629966240&amp;amp;adid=51HERB1501&amp;amp;c58=isLive,false&amp;amp;c59=sesid,iqal6k21r0de8gm901kif5xznar7q1629966240&amp;amp;c61=createtm,1629966255&amp;amp;c63=pipMode,&amp;amp;ci_userid=&amp;amp;is_auto_play=&amp;amp;pl_title=&amp;amp;is_prem=&amp;amp;is_prog=&amp;amp;ad_origin=&amp;amp;adidx=1%2F1&amp;amp;is_tpad=&amp;amp;ci_passthr=&amp;amp;c62=sendTime,1629966255&amp;amp;c68=bndlid,se.aftonbladet.Aftonbladet&amp;amp;c69=cvw,&amp;amp;nodeTM=&amp;amp;logTM=&amp;amp;c73=phtype,&amp;amp;c74=dvcnm,&amp;amp;c76=adbsnid,&amp;amp;uoo=&amp;amp;c44=progen,&amp;amp;davty=1&amp;amp;si=&amp;amp;c66=mediaurl,&amp;amp;sdd=retry,0~~retryreason,~~devmodel,iPhone9%2C4~~devtypid,iPhone9%2C4~~sysname,iOS~~sysversion,14.6~~manuf,Apple&amp;amp;cat_id=a6f7fb13-8801-484c-9692-6db6dfb470aa&amp;amp;vtoff=0&amp;amp;rnd=1629966255319&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Provide your app for certification ==&lt;br /&gt;
Once ready please send your application to Nielsen local staff for certification.&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Following Nielsen testing, you will need to:&lt;br /&gt;
&lt;br /&gt;
# '''Disable Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_devDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
# '''Notify Nielsen''': Once you are ready to go live, let us know so we can enable you for reporting. We will not be able to collect or report data prior to receiving notification from you.&lt;/div&gt;</summary>
		<author><name>ColinBrown</name></author>
	</entry>
</feed>