https://engineeringportal.nielsen.com//w/index.php?title=DCR_Thailand_Video_iOS_SDK&feed=atom&action=historyDCR Thailand Video iOS SDK - Revision history2024-03-29T08:23:29ZRevision history for this page on the wikiMediaWiki 1.32.2https://engineeringportal.nielsen.com//w/index.php?title=DCR_Thailand_Video_iOS_SDK&diff=6722&oldid=prevBryanLim at 01:03, 21 March 20242024-03-21T01:03:15Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 01:03, 21 March 2024</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l11" >Line 11:</td>
<td colspan="2" class="diff-lineno">Line 11:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>{{iOS_SpecialNotes_for_iOS14}}</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>{{iOS_SpecialNotes_for_iOS14}}</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; 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;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; 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;"><div><ins style="font-weight: bold; text-decoration: none;">{{iOS_SpecialNotes_for_iOS17}}</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>== Prerequisites ==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>== Prerequisites ==</div></td></tr>
</table>BryanLimhttps://engineeringportal.nielsen.com//w/index.php?title=DCR_Thailand_Video_iOS_SDK&diff=5516&oldid=prevBryanLim at 05:07, 25 November 20212021-11-25T05:07:01Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 05:07, 25 November 2021</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l148" >Line 148:</td>
<td colspan="2" class="diff-lineno">Line 148:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>| segB || custom segment B. Custom segments can be used to aggregate content however you choose. Some examples include genre, category, or platform. || custom ||</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>| segB || custom segment B. Custom segments can be used to aggregate content however you choose. Some examples include genre, category, or platform. || custom ||</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>|-</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>|-</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; 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;"><div>| segC || <del class="diffchange diffchange-inline">custom segment C. Custom segments can be used to aggregate content however you choose. Some examples include genre, category</del>, <del class="diffchange diffchange-inline">or platform. </del>|| custom ||</div></td><td class='diff-marker'>+</td><td style="color: #222; 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;"><div>| segC || <ins class="diffchange diffchange-inline">For VOD: Populate TVContent ID</ins>, <ins class="diffchange diffchange-inline">For livestream: leave blank </ins>|| custom || <ins class="diffchange diffchange-inline">Required for VOD only</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>|-</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>|-</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>|-</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>|-</div></td></tr>
</table>BryanLimhttps://engineeringportal.nielsen.com//w/index.php?title=DCR_Thailand_Video_iOS_SDK&diff=5511&oldid=prevBryanLim at 05:50, 24 November 20212021-11-24T05:50:15Z<p></p>
<a href="https://engineeringportal.nielsen.com//w/index.php?title=DCR_Thailand_Video_iOS_SDK&diff=5511&oldid=5307">Show changes</a>BryanLimhttps://engineeringportal.nielsen.com//w/index.php?title=DCR_Thailand_Video_iOS_SDK&diff=5307&oldid=prevColinBrown: /* Overview */2021-09-14T23:50:43Z<p><span dir="auto"><span class="autocomment">Overview</span></span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 23:50, 14 September 2021</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l8" >Line 8:</td>
<td colspan="2" class="diff-lineno">Line 8:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>*Time of viewing a sub section / page in the application.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>*Time of viewing a sub section / page in the application.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; 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;"><div><del style="font-weight: bold; text-decoration: none;">If the content being played contains ID3 tags, when played on a mobile device or within a browser, these tags can be sent to Nielsen for collection/processing via the Nielsen SDK. </del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div><blockquote></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div><blockquote></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>VOD in TV Ratings (formally knows as Recently Telecast VOD) support is now available; however, you must notify us to ensure accurate reporting.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>VOD in TV Ratings (formally knows as Recently Telecast VOD) support is now available; however, you must notify us to ensure accurate reporting.</div></td></tr>
</table>ColinBrownhttps://engineeringportal.nielsen.com//w/index.php?title=DCR_Thailand_Video_iOS_SDK&diff=5306&oldid=prevColinBrown at 23:50, 14 September 20212021-09-14T23:50:17Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 23:50, 14 September 2021</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l4" >Line 4:</td>
<td colspan="2" class="diff-lineno">Line 4:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>== Overview ==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>== Overview ==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>The Nielsen SDK is one of multiple framework SDKs that Nielsen provides to enable measuring linear (live) and on-demand TV viewing using TVs, mobile devices, etc.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>The Nielsen SDK is one of multiple framework SDKs that Nielsen provides to enable measuring linear (live) and on-demand TV viewing using TVs, mobile devices, etc.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; 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;"><div>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 in TV Ratings<del class="diffchange diffchange-inline">, </del>Digital Content Ratings (<del class="diffchange diffchange-inline">[[</del>DCR <del class="diffchange diffchange-inline">& DTVR]]), and [[Digital Ad Ratings]] (DAR</del>). Nielsen SDKs are also equipped to measure static content and can track key life cycle events of an application like:</div></td><td class='diff-marker'>+</td><td style="color: #222; 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;"><div>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 in TV Ratings <ins class="diffchange diffchange-inline">and </ins>Digital Content Ratings (DCR). Nielsen SDKs are also equipped to measure static content and can track key life cycle events of an application like:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>*Application launch events and how long app was running</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>*Application launch events and how long app was running</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>*Time of viewing a sub section / page in the application.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>*Time of viewing a sub section / page in the application.</div></td></tr>
</table>ColinBrownhttps://engineeringportal.nielsen.com//w/index.php?title=DCR_Thailand_Video_iOS_SDK&diff=5305&oldid=prevColinBrown: Replaced content with "{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|International DCR}} {{CurrentBreadcrumb}} Category:Digital == Overview == The Nielsen SDK is one of multiple fram..."2021-09-14T23:49:13Z<p>Replaced content with "{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|International DCR}} {{CurrentBreadcrumb}} <a href="/docs/Category:Digital" title="Category:Digital">Category:Digital</a> == Overview == The Nielsen SDK is one of multiple fram..."</p>
<a href="https://engineeringportal.nielsen.com//w/index.php?title=DCR_Thailand_Video_iOS_SDK&diff=5305&oldid=4321">Show changes</a>ColinBrownhttps://engineeringportal.nielsen.com//w/index.php?title=DCR_Thailand_Video_iOS_SDK&diff=4321&oldid=prevColinBrown at 01:46, 10 September 20202020-09-10T01:46:09Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 01:46, 10 September 2020</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; 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;"><div>{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|International}} {{CurrentBreadcrumb}}</div></td><td class='diff-marker'>+</td><td style="color: #222; 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;"><div>{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|International <ins class="diffchange diffchange-inline">DCR</ins>}} {{CurrentBreadcrumb}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>[[Category:Digital]]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"><div>[[Category:Digital]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; 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;"></td></tr>
</table>ColinBrownhttps://engineeringportal.nielsen.com//w/index.php?title=DCR_Thailand_Video_iOS_SDK&diff=2938&oldid=prevAdmin: Admin moved page DCR Thailand Video iOS to DCR Thailand Video iOS SDK without leaving a redirect2018-10-15T19:40:43Z<p>Admin moved page <a href="/w/index.php?title=DCR_Thailand_Video_iOS&action=edit&redlink=1" class="new" title="DCR Thailand Video iOS (page does not exist)">DCR Thailand Video iOS</a> to <a href="/docs/DCR_Thailand_Video_iOS_SDK" title="DCR Thailand Video iOS SDK">DCR Thailand Video iOS SDK</a> without leaving a redirect</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">Revision as of 19:40, 15 October 2018</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>Adminhttps://engineeringportal.nielsen.com//w/index.php?title=DCR_Thailand_Video_iOS_SDK&diff=2937&oldid=prevAdmin: Created page with "{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|International}} {{CurrentBreadcrumb}} Category:Digital == Overview == The Nielsen SDK is one of multiple framework SD..."2018-10-15T19:40:17Z<p>Created page with "{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|International}} {{CurrentBreadcrumb}} <a href="/docs/Category:Digital" title="Category:Digital">Category:Digital</a> == Overview == The Nielsen SDK is one of multiple framework SD..."</p>
<p><b>New page</b></p><div>{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|International}} {{CurrentBreadcrumb}}<br />
[[Category:Digital]]<br />
<br />
== Overview ==<br />
The Nielsen SDK is one of multiple framework SDKs that Nielsen provides to enable measuring live streaming and on-demand video content viewing using TVs, mobile devices, etc.<br />
<br />
== Prerequisites ==<br />
To start using the App SDK, the following details are required:<br />
* '''App ID (appid):''' Unique ID assigned to the player/site and configured by product.<br />
* '''sfcode:''' Unique identifier for the environment that the SDK should point to.<br />
* '''Nielsen SDK:''' The Nielsen SDK package contains a variety of sample players for your reference.<br />
If you do not have any of these prerequisites or if you have any questions, please contact our SDK sales support team.<br />
Refer to [[Digital Measurement Onboarding]] guide for information on how to get a Nielsen App SDK and appid.<br />
<br />
== Implementation ==<br />
This guide covers implementation steps for iOS using Xcode.<br />
<br />
== Setting up your Development Environment ==<br />
<big><br />
'''Configuring Xcode Development Environment''' <br />
</big> <br />
<br />
Nielsen App SDK is compatible with Apple iOS versions 9.0 and above.<br />
<br />
The SDK uses the NSURLSession instead of the deprecated NSURLConnection.<br />
<br />
<blockquote>'''Note''': All communications between the SDK and the Census (Collection Facility) use HTTPS.</blockquote><br />
<br />
<big>'''Importing Frameworks'''</big><br />
The first step is to ensure that the following frameworks and libraries are imported into the Frameworks folder of the Xcode project before creating an instance of the Nielsen App SDK object.<br />
* UIKit.framework<br />
* Foundation.framework<br />
* AdSupport.framework<br />
* SystemConfiguration.framework<br />
* Security.framework<br />
** Nielsen Analytics framework makes use of a number of functions in this library.<br />
* AVFoundation.framework<br />
** This framework is mandatory for the iOS SDK version 5.1.1 to work.<br />
* CoreLocation.framework<br />
* CoreMedia.framework<br />
* NielsenAppApi.framework<br />
* libc++.tbd (as SDK contains Objective C++ source file)<br />
** Alternatively, include -lstdc++ in Build Settings → Other Linker Flag of the Xcode project<br />
<br />
<blockquote>'''Example'''<br />
* Extract “NielsenAppApi.Framework” from the Nielsen App SDK sample app and copy it to Frameworks folder of the Xcode project.<br />
* Add the code <code>-#import NielsenAppApi/NielsenAppApi.h</code> to the View Controller’s header file.</blockquote><br />
<br />
Ensure that the following are included in the Linked Frameworks and Libraries list (located in the project’s Summary settings).<br />
* Nielsen App SDK<br />
* iOS security framework<br />
<br /><br />
<big>'''Using Swift'''</big><br />
To import a set of Objective-C files in the same app target as your Swift code, you rely on an Objective-C bridging header to expose those files to Swift. Xcode offers to create this header file when you add a Swift file to an existing Objective-C app, or an Objective-C file to an existing Swift app.<br />
<br />
Select File/New File/Objective-C File <br /><br />
Xcode will prompt you to create a bridging header.<br />
[[File:bridgingheader 2x.png|600px|center|link=]] <br /><br />
Once this file has been created, you need to add the following:<br />
<syntaxhighlight lang="swift"><br />
#import <NielsenAppApi/NielsenAppApi.h><br />
</syntaxhighlight><br />
<big>'''Using Objective-C'''</big><br />
Add the code <br />
<syntaxhighlight lang ="objective-c"><br />
#import <NielsenAppApi/NielsenAppApi.h><br />
</syntaxhighlight><br />
to the View Controller’s header file.<br />
<br /><br />
<br />
== SDK Initialization ==<br />
The latest version of the Nielsen App SDK allows instantiating multiple instances of the SDK object, which can be used simultaneously without any issue. The sharedInstance API that creates a singleton object was deprecated prior to version 5.1.1. (Version 4.0 for Android)<br />
<br />
* A maximum of four SDK instances per appid are supported. When a fifth SDK instance is launched, the SDK will return “nil” from [[initWithAppInfo:delegate:]]<br />
* When four SDK instances exist, you must destroy an old instance before creating a new one.<br />
<br />
The following table contains the list of arguments that can be passed via the AppInfo JSON schema.<br />
<br />
* The appid is provided by the Nielsen Technical Account Manager (TAM). The appid is a GUID data type and is specific to the application.<br />
{| class="wikitable"<br />
|-<br />
! Parameter / Argument !! Description !! Source !! Required/Obligatory? !! Example<br />
|-<br />
| appid || Unique id for the application assigned by Nielsen. It is GUID data type.|| Nielsen-specified || ✓ || PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX<br />
|-<br />
| appversion || Current version of the app used || Client-defined || No || "1.0.2"<br />
|-<br />
| sfcode || Nielsen collection facility to which the SDK should connect.<br />
|| Nielsen-specified || ✓ || "dcr"<br />
|-<br />
| nol_devDebug || Enables Nielsen console logging. Only required for testing<br />
|| Nielsen-specified || Optional || "DEBUG"<br />
|}<br />
<br /><br />
==== Sample SDK Initialization Code ====<br />
Swift 4.0 Example:<br />
<code>NielsenInit.swift</code><br />
<syntaxhighlight lang="swift"><br />
class NielsenInit: NSObject {<br />
class func createNielsenAppApi(delegate: NielsenAppApiDelegate) -> NielsenAppApi?{<br />
let appInformation:[String: String] = [<br />
"appid": "PDA7D5EE6-B1B8-XXXX-XXXX-2A788BCXXXXX",<br />
"appversion": "1.0",<br />
"sfcode": "dcr",<br />
"nol_devDebug": "DEBUG"<br />
]<br />
return NielsenAppApi(appInfo:appInformation, delegate:delegate)<br />
}<br />
}<br />
</syntaxhighlight><br />
<br />
<br />
Sample code using AVPlayer.<br />
<br /><br />
<code>ViewController.swift</code><br />
<br />
<syntaxhighlight lang="swift"><br />
class ViewController: UIViewController, NielsenAppApiDelegate, AVPictureInPictureControllerDelegate, CLLocationManagerDelegate {<br />
<br />
let avPlayerViewController = AVPlayerViewController()<br />
var avPlayer:AVPlayer?<br />
var nielsenAppApi: NielsenAppApi!<br />
<br />
override func viewDidLoad() {<br />
super.viewDidLoad()<br />
<br />
self.nielsenAppApi = NielsenInit.createNielsenAppApi(delegate: self)<br />
NSLog("Nielsen SDK initialized")<br />
<br />
}<br />
}<br />
</syntaxhighlight><br />
<br />
== APP SDK Error & Event Codes ==<br />
To view the Error and Event codes for iOS, please review the [[APP SDK Event Codes|App SDK Event Code]] Reference page.<br />
<br />
== Configure Payload ==<br />
=== Handling JSON Metadata ===<br />
All the SDK methods handles only two types of objects: NSString, NSDictionary. The parameters passed must be either a JSON formatted string or a NSDictionary object. The JSON passed in the SDK must be well-formed.<br />
* NSDictionary object<br />
** If an object of unexpected type is passed to the method, the error message will be logged.<br />
** If string has invalid JSON format, the error message will be logged.<br />
* JSON value must be string value.<br />
** This includes boolean and numeric values. For example, a value of true should be represented with "true", number value 123 should be "123".<br />
** All the Variable Names like appid, appname, sfcode, dataSrc, title, type etc. are case-sensitive. Use the correct variable name as specified in the documentation.<br />
* JSON string can be prepared using either raw NSString or serialized NSDictionary.<br />
<br />
<syntaxhighlight lang="swift"><br />
let channelInfo = [<br />
"channelName": "My Channel Name 1",<br />
];<br />
<br />
let contentMetadata = [<br />
"type": "content",<br />
"assetid": "88675545",<br />
"title": "Program S3, EP1",<br />
"isfullepisode": "n",<br />
"adloadtype": "2",<br />
"SegmentB": "custom",<br />
"SegmentC": "custom",<br />
"program": "Program Name",<br />
"length": "3600" <br />
];<br />
</syntaxhighlight><br />
<br />
=== Configure metadata === <br />
channelName should remain constant throughout the completion of an episode or live stream.<br />
<br /><br />
{| class="wikitable"<br />
|-<br />
! Key !! Description !! Values !! Required<br />
|-<br />
| channelName || Any string representing the channel/stream || custom || ✓<br />
|-<br />
|}<br />
<br/><br />
<br />
=== Content Metadata (VOD) ===<br />
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.<br />
<table><br />
<tr><br />
<th> Keys </th><br />
<th> Description </th><br />
<th> Example </th><br />
<th> Required<br />
</th></tr><br />
<tr><br />
<td>'''type'''</td><br />
<td><code>'content', 'ad'</code></td><br />
<td> <code> 'content'</code> </td><br />
<td> Yes<br />
</td></tr><br />
<tr><br />
<td> '''assetid''' </td><br />
<td> unique ID assigned to asset </td><br />
<td> custom </td><br />
<td> Yes<br />
</td></tr><br />
<tr><br />
<td> '''program''' </td><br />
<td>name of program (25 character limit) </td><br />
<td> custom </td><br />
<td> Yes<br />
</td></tr><br />
<tr><br />
<td> '''title''' </td><br />
<td>name of program (40 character limit) </td><br />
<td> custom </td><br />
<td> Yes<br />
</td></tr><br />
<tr><br />
<td> '''length''' </td><br />
<td> length of content in seconds </td><br />
<td> <code>seconds</code> </td><br />
<td> Yes<br />
</td></tr><br />
<tr><br />
<td> '''isfullepisode''' </td><br />
<td> full episode flag</td><br />
<td> "y"- full episode, "n"- non full episode</td><br />
<td> Yes<br />
</td></tr><br />
<tr><br />
<td> <b>adloadtype</b><br />
</td><br />
<td> ad model only pass value as 2<br />
</td><br />
<td> 2<br />
</td><br />
<td>Yes<br />
</td></tr><br />
<tr><br />
<td> '''segB''' </td><br />
<td> custom segment B</td><br />
<td> custom </td><br />
<td><br />
</td></tr><br />
<tr><br />
<td> '''segC''' </td><br />
<td> custom segment C</td><br />
<td> custom </td><br />
<td><br />
</td></tr><br />
<tr><br />
<td> '''crossId1''' </td><br />
<td> standard episode ID </td><br />
<td> custom </td><br />
<td> <br />
</td></tr><br />
<tr><br />
<td> '''crossId2 '''</td><br />
<td> content originator (only required for distributors) </td><br />
<td> Nielsen provided </td><br />
<td><br />
</td></tr><br />
<br />
</table><br />
<br /><br />
<br />
==== Example Content Object (VOD) ====<br />
<syntaxhighlight lang="swift""><br />
let contentMetadata = [<br />
"type": "content",<br />
"assetid": "88675545",<br />
"title": "Program S3, EP1",<br />
"isfullepisode": "n",<br />
"adloadtype": "2",<br />
"SegmentB": "custom",<br />
"SegmentC": "custom",<br />
"program": "Program Name",<br />
"length": "3600" <br />
];<br />
</syntaxhighlight><br />
<br />
<br/><br />
==== Content Metadata (Live Streaming)====<br />
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.<br />
<table><br />
<tr><br />
<th> Keys </th><br />
<th> Description </th><br />
<th> Example </th><br />
<th> Required<br />
</th></tr><br />
<tr><br />
<td>'''type'''</td><br />
<td><code>'content', 'ad'</code></td><br />
<td> <code> 'content'</code> </td><br />
<td> Yes<br />
</td></tr><br />
<tr><br />
<td> '''assetid''' </td><br />
<td> unique ID for each quarter </td><br />
<td> live021 </td><br />
<td> Yes<br />
</td></tr><br />
<tr><br />
<td> '''program''' </td><br />
<td>name of program (25 character limit) </td><br />
<td> "CH Live" </td><br />
<td> Yes<br />
</td></tr><br />
<tr><br />
<td> '''title''' </td><br />
<td>Use period as title name per each quarter </td><br />
<td>”02.00-02.14”</td><br />
<td> Yes</td></tr><br />
<tr><br />
<td> '''length''' </td><br />
<td> length of content in seconds </td><br />
<td> 900 </td><br />
<td> Yes<br />
</td></tr><br />
<tr><br />
<td> '''isfullepisode''' </td><br />
<td> full episode flag</td><br />
<td> 'y'- full episode</td><br />
<td> Yes<br />
</td></tr><br />
<tr><br />
<td> <b>adloadtype</b><br />
</td><br />
<td> ad model (only pass value as 2)<br />
</td><br />
<td> '2'</td><br />
<td>Yes<br />
</td></tr><br />
<tr><br />
<td> '''segB''' </td><br />
<td> custom segment B</td><br />
<td> custom </td><br />
<td><br />
</td></tr><br />
<tr><br />
<td> '''segC''' </td><br />
<td> custom segment C</td><br />
<td> custom </td><br />
<td><br />
</td></tr><br />
<tr><br />
<td> '''crossId1''' </td><br />
<td> standard episode ID </td><br />
<td> custom </td><br />
<td> <br />
</td></tr><br />
<tr><br />
<td> '''crossId2 '''</td><br />
<td> content originator (only required for distributors) </td><br />
<td> Nielsen provided </td><br />
<td><br />
</td></tr><br />
</table><br />
<br />
==== Example Content Object (Live Streaming)====<br />
<syntaxhighlight lang="swift""><br />
let contentMetadata = [<br />
type: 'content',<br />
assetid: 'live021',<br />
program: 'CHLive',<br />
title: '02.00-02.14',<br />
length: '900',<br />
isfullepisode: 'y',<br />
adloadtype:'2'<br />
];<br />
</syntaxhighlight><br />
<br />
<br/><br />
<br />
=== Ad Metadata ===<br />
The ad metadata (if applicable) should be passed for each individual ad, if ads are available during or before the stream begins.<br />
<br/><br />
{| class="wikitable"<br />
|-<br />
! Keys !! Description !! Values !! Required<br />
|-<br />
| type || type of ad || 'preroll', 'midroll', or 'postroll' || ✓<br />
|-<br />
| assetid || unique ID assigned to ad || custom || ✓<br />
|}<br />
<br />
==== Example Ad Object ====<br />
<br />
<syntaxhighlight lang="swift""><br />
let adMetadataObject = [<br />
assetid: 'AD-1',<br />
type: 'preroll'<br />
];<br />
</syntaxhighlight><br />
<br />
<br/><br />
<br />
== Configure API Calls ==<br />
<br />
=== Life cycle of SDK instance ===<br />
Life cycle of SDK instance includes four general states:<br />
# '''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'''.<br />
# '''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.<br />
# '''Processing state''' – The SDK instance is processing playing information. [[#play|play]] and [[#Content_Metadata|loadMetadata]] calls move the SDK instance into this state. In this state, the SDK instance will be able to process the following calls.<br />
## [[#play|playheadPosition]] – Call this API every one second when playhead position timer is fired.<br />
## [[#stop|stop]] – Call this API when the playback is paused, switches between content and ad (within the same content playback) or encounters interruptions.<br />
## [[#play|end]] – SDK instance exits from Processing state when this API is called.<br />
# '''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.<br />
## Initialization fails<br />
## <code>appDisableApi</code> is called<br />
<br />
<blockquote><br />
'''Note''': In case of any interruptions during playback due to alarm, calendar, call, flight mode, Wi-Fi toggle, channel change, etc., call [[#stop|stop]] to stop the measurement.<br />
* As soon as the playback resumes, call [[#play|play]], [[#Content_Metadata|loadMetadata]] and [[playheadPosition]].</blockquote><br />
<br />
=== API Call sequence ===<br />
==== Use Case 1: Content has no Advertisements ====<br />
Call [[#play|play()]] with channelName JSON as below.<br />
<syntaxhighlight lang="json">{<br />
"channelName": "TheMovieTitle"<br />
}</syntaxhighlight><br />
Call [[#Content_Metadata|loadMetadata()]] with JSON metadata for content as below.<br />
<syntaxhighlight lang="json">{<br />
"type": "content",<br />
"assetid": "vid345-67483",<br />
"program": "ProgramName",<br />
"title": "Program S3, EP1",<br />
"length": "3600",<br />
...<br />
}</syntaxhighlight><br />
Call [[setPlayheadPosition()]] every one second until a pause / stop.<br />
Use the sample API sequence below as a reference to identify the specific events that need to be called during content playback without ads.<br />
{| class="wikitable"<br />
|-<br />
! Type !! Sample code !! Description<br />
|-<br />
| rowspan="2" | Start of stream || <code>mAppSdk.play(channelName); </code> || // channelName contains JSON metadata of channel/video name being played<br />
|-<br />
| <code>mAppSdk.loadMetadata(contentMetaDataObject);</code> || // contentMetadataObject contains the JSON metadata for the content being played<br />
|-<br />
| Content || <code>mAppSdk.setPlayheadPosition(playheadPosition);</code> || // position is position of the playhead while the content is being played<br />
|-<br />
| End of Stream || <code>mAppSdk.end();</code> || // Content playback is completed.<br />
|}<br />
<br />
==== Use Case 2: Content has Advertisements ====<br />
Call [[#play|play()]] with channelName JSON as below.<br />
<syntaxhighlight lang="json">{<br />
"channelName": "TheMovieTitle"<br />
}</syntaxhighlight><br />
Call [[#Content_Metadata|loadMetadata()]] with JSON metadata for ad as below.<br />
<syntaxhighlight lang="json">{<br />
"type": "preroll",<br />
"assetid": "ad=123"<br />
}</syntaxhighlight><br />
<blockquote>Note: In case the individual ad details are not available, send ad pod (presence) details through the [[#Content_Metadata|loadMetadata]] and playhead position through [[playheadPosition]].</blockquote><br />
<br />
Call [[setPlayheadPosition()]] every one second until a pause / stop / another [[#Content_Metadata|loadMetadata()]] is called. Playhead should be passed for the entire duration of ad pod, if the ad pod details are passed as part of [[#Content_Metadata|loadMetadata()]]. <br />
<br />
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.<br />
{| class="wikitable"<br />
|-<br />
! Type !! Sample code !! Description<br />
|-<br />
| rowspan="2" | Start of stream || <code>mAppSdk.play(channelName); </code> || // channelName contains JSON metadata of channel/video name being played<br />
|-<br />
| <code>mAppSdk.loadMetadata(contentMetaDataObject);</code> || // contentMetadataObject contains the JSON metadata for the content being played<br />
|-<br />
| rowspan="3" | Preroll || <code>mAppSdk.loadMetadata(prerollMetadataObject);</code> || // prerollMetadataObject contains the JSON metadata for the preroll ad<br />
|-<br />
| <code>mAppSdk.setPlayheadPosition(playheadPosition);</code> || // position is position of the playhead while the preroll ad is being played<br />
|-<br />
| <code>mAppSdk.stop();</code> || // Call stop after preroll occurs<br />
|-<br />
| rowspan="3" | Content || <code>mAppSdk.loadMetadata(contentMetaDataObject);</code> || // contentMetadataObject contains the JSON metadata for the content being played<br />
|-<br />
| <code>mAppSdk.setPlayheadPosition(playheadPosition);</code> || // position is position of the playhead while the content is being played<br />
|-<br />
| <code>mAppSdk.stop();</code> || // Call stop after the content is paused (ad starts)<br />
|-<br />
| rowspan="6" | Midroll || <code>mAppSdk.loadMetadata(midrollMetaDataObject);</code> || // midrollMetadataObject contains the JSON metadata for the midroll ad<br />
|-<br />
| <code>mAppSdk.setPlayheadPosition(playheadPosition);</code> || // position is position of the playhead while the midroll ad is being played<br />
|-<br />
| <code>mAppSdk.stop();</code> || // App moves to background(midroll pauses) <br />
|-<br />
| <code>mAppSdk.loadMetadata(midrollMetaDataObject);</code> || // App moves to foreground (midroll resumes) <br />
|-<br />
| <code>mAppSdk.setPlayheadPosition(playheadPosition);</code> || // playheadPosition is position of the playhead while the midroll ad is being played <br />
|-<br />
| <code>mAppSdk.stop();</code> || // Call stop after midroll occurs<br />
|-<br />
| rowspan="3" | Content (End of stream) || <code>mAppSdk.loadMetadata(contentMetaDataObject);</code> || // contentMetadataObject contains the JSON metadata for the content being played<br />
|-<br />
| <code>mAppSdk.setPlayheadPosition(playheadPosition);</code> || // position is position of the playhead while the content is being played<br />
|-<br />
| End of Stream || <code>mAppSdk.end();</code> || // Call end() at the end of content<br />
|-<br />
| rowspan="3" | Postroll || <code>mAppSdk.loadMetadata(postrollMetaDataObject);</code> || // postrollMetadataObject contains the JSON metadata for the postroll ad<br />
|-<br />
| <code>mAppSdk.setPlayheadPosition(playheadPosition);</code> || // position is position of the playhead while the postroll ad is being played<br />
|-<br />
| <code>mAppSdk.stop();</code> || // Call stop after postroll occurs<br />
|}<br />
<br />
<blockquote>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.</blockquote><br />
<br />
=== Sequence Examples VOD ===<br />
The example code below will differ from your production application. Provided to assist in explaining how to implement.<br />
<br />
=== play ===<br />
Use [[#play|play]] to pass the channel descriptor information through channelName parameter when the user taps the '''Play''' button on the player.<br />
<syntaxhighlight lang="swift">nielsenAppApi?.play(JSONObject channelInfo);</syntaxhighlight><br />
<br />
=== loadMetadata ===<br />
<syntaxhighlight lang="swift">self.nielsenAppApi?.loadMetadata(contentMetadata)</syntaxhighlight><br />
<br />
=== playheadPosition/setPlayheadPosition ===<br />
Please note: iOS sdk uses playheadPosition. Android uses setPlayheadPosition.<br />
<syntaxhighlight lang="swift"><br />
//Monitor the Playhead position of the AVPlayer<br />
let timeInterval: CMTime = CMTimeMakeWithSeconds(1.0,10)<br />
self.avPlayerViewController.player?.addPeriodicTimeObserver(forInterval: timeInterval, queue: DispatchQueue.main) {(elapsedTime: CMTime) -> Void in<br />
if self.avPlayerViewController.player!.currentItem?.status == .readyToPlay {<br />
let time : Float64 = self.avPlayerViewController.player!.currentTime().seconds;<br />
let pos = Int64(time);<br />
NSLog("New Elapse Time = \(time)");<br />
self.nielsenAppApi?.playheadPosition(pos);<br />
}<br />
<br />
</syntaxhighlight><br />
<br />
=== stop ===<br />
<syntaxhighlight lang="swift">self.nielsenAppApi?.stop</syntaxhighlight><br />
<br />
=== end ===<br />
When content stop is initiated and content cannot be resumed from the same position (it can only be restarted from the beginning of stream).<br />
<syntaxhighlight lang="swift">self.nielsenAppApi?.end</syntaxhighlight><br />
<br />
<br />
=== Sequence Examples Live Streaming ===<br />
The example code below will differ from your production application. Provided to assist in explaining how to implement.<br />
<br />
=== play ===<br />
Use [[#play|play]] to pass the channel descriptor information through channelName parameter when the user taps the '''Play''' button on the player.<br />
<syntaxhighlight lang="swift">nielsenAppApi?.play(JSONObject channelInfo);</syntaxhighlight><br />
<br />
=== loadMetadata ===<br />
Pass metadata for live streaming - Title will be dynamic depend on current time on device that user play the live streaming<br />
<syntaxhighlight lang="swift">self.nielsenAppApi?.loadMetadata(contentMetadata)</syntaxhighlight><br />
<br />
=== playheadPosition/setPlayheadPosition ===<br />
Please note: iOS sdk uses playheadPosition. Android uses setPlayheadPosition.<br />
<syntaxhighlight lang="swift"><br />
//Monitor the Playhead position of the AVPlayer<br />
let timeInterval: CMTime = CMTimeMakeWithSeconds(1.0,10)<br />
self.avPlayerViewController.player?.addPeriodicTimeObserver(forInterval: timeInterval, queue: DispatchQueue.main) {(elapsedTime: CMTime) -> Void in<br />
if self.avPlayerViewController.player!.currentItem?.status == .readyToPlay {<br />
var pos: TimeInterval<br />
pos = Date().timeIntervalSince1970<br />
self.nielsenAppApi?.playheadPosition(Int64(pos))<br />
}<br />
<br />
</syntaxhighlight><br />
<br />
=== When the quarter hour change ===<br />
<br />
=== end ===<br />
Call end for the previous quarter hour.<br />
<syntaxhighlight lang="swift">self.nielsenAppApi?.end</syntaxhighlight><br />
<br />
=== play ===<br />
Call play for start of new quarter hour<br />
<syntaxhighlight lang="swift">nielsenAppApi?.play(JSONObject channelInfo);</syntaxhighlight><br />
<br />
=== loadMetadata ===<br />
Call loadMetadata and pass content metadata for new quarter hour<br />
<syntaxhighlight lang="swift">self.nielsenAppApi?.loadMetadata(contentMetadata)</syntaxhighlight><br />
<br />
=== playheadPosition/setPlayheadPosition ===<br />
Please note: iOS sdk uses playheadPosition. Android uses setPlayheadPosition.<br />
<syntaxhighlight lang="swift"><br />
//Monitor the Playhead position of the AVPlayer<br />
let timeInterval: CMTime = CMTimeMakeWithSeconds(1.0,10)<br />
self.avPlayerViewController.player?.addPeriodicTimeObserver(forInterval: timeInterval, queue: DispatchQueue.main) {(elapsedTime: CMTime) -> Void in<br />
if self.avPlayerViewController.player!.currentItem?.status == .readyToPlay {<br />
var pos: TimeInterval<br />
pos = Date().timeIntervalSince1970<br />
self.nielsenAppApi?.playheadPosition(Int64(pos))<br />
}<br />
</syntaxhighlight><br />
<br />
== Interruptions during playback ==<br />
As part of integrating Nielsen App SDK with the player application, the Audio / Video app developer needs to handle the following possible interruption scenarios:<br />
* Pause / Play<br />
* Network Loss (Wi-Fi / Airplane / Cellular)<br />
* Call Interrupt (SIM or Third party Skype / Hangout call)<br />
* Alarm Interrupt<br />
* Content Buffering<br />
* Device Lock / Unlock (Video players only, not for Audio players)<br />
* App going in the Background/Foreground (Video players only, not for Audio players)<br />
* Channel / Station Change Scenario<br />
* Unplugging of headphone<br />
In case of encountering one of the above interruptions, the player application needs to<br />
* Call [[#stop|stop]] immediately (except when content is buffering) and withhold sending playhead position.<br />
* Start sending pings – [[#loadMetadata|loadMetadata]] and [[playheadPosition]] for the new viewing session, once the playback resumes.<br />
Please see the [[Digital Measurement FAQ]] for more details<br />
<br />
== Handling Foreground and Background states ==<br />
<br />
For iOS, background/foreground detection is handled by the app lifecylce APIs which are provided by [https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/TheAppLifeCycle/TheAppLifeCycle.html Apple:]<br />
<br />
Foreground/Background state measurement is a requirement of Nielsen AppSDK implementation.<br />
<br />
== Privacy and Opt-Out ==<br />
<br />
Users must either have access to the "About Nielsen Measurement" page, or have similar text available within the native app. Include "About Nielsen Measurement" and "Your Choices" link in the Privacy Policy / EULA or as a button near the link to the app's Privacy Policy.<br />
<br />
* URL to this web page should be called from SDK by invoking userOptOutURLString() and opened in 'WebView' / External browser.<br />
* If the App SDK returns NULL as Opt-Out URL, handle the exception gracefully and retry later.<br />
* To retrieve the current Opt-Out status of a device, use the userOptOutURLString() method. <br />
<syntaxhighlight lang ="swift "><br />
public String userOptOutURLString()<br />
public boolean getOptOutStatus()<br />
</syntaxhighlight><br />
<br><br />
Users can opt out or opt back into Nielsen Measurement. Opt-Out feature relies on the system setting – "Limit Ad Tracking". The setting can be accessed in the Settings application on any device. User is opted out of Nielsen online measurement research when the "Limit Ad Tracking" setting is enabled.<br />
<br />
In addition, the following text must be included in your app store description.<br />
<br />
'''"Please note: This app features Nielsen’s proprietary measurement software which contributes to market research. Please see http://priv-policy.imrworldwide.com/priv/mobile/th/en/optout.html for more information"'''<br />
<br />
== Going Live ==<br />
Following Nielsen testing, users need to make one update to the initialization call to ensure that the site is being measured properly.<br />
<br />
# '''Debug Logging''': Disable logging by deleting <code>{nol_sdkDebug: 'DEBUG'}</code> from initialization call.<br />
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:<br />
<br />
'''<big>iOS Example:</big>'''<br />
<br />
<syntaxhighlight lang="swift"><br />
class NielsenInit: NSObject {<br />
class func createNielsenAppApi(delegate: NielsenAppApiDelegate) -> NielsenAppApi?{<br />
let appInformation:[String: String] = [<br />
"appid": "PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",<br />
"sfcode": "dcr"<br />
// Remove Flag: "nol_devDebug": "DEBUG"<br />
]<br />
return NielsenAppApi(appInfo:appInformation, delegate:delegate)<br />
}<br />
}<br />
</syntaxhighlight><br />
<br />
'''Note''': before going live you have to inform Nielsen team - this is necessary, because Nielsen team has to adjust internal configuration parameter to enable data collection. Without that notification no data will be collected and no data will be reported.</div>Admin