initWithAppInfo:delegate:: Difference between revisions
From Engineering Client Portal
(Created page with "{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|iOS SDK Reference}} {{CurrentBreadcrumb}} Category:Digital Category:iOS SDK Reference == Syntax == <syntaxhighlig...") |
m (Changes to add luid parameter in SDK init for iOS) |
||
(13 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|iOS SDK Reference}} {{CurrentBreadcrumb}} | {{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|iOS SDK API Reference}} {{CurrentBreadcrumb}} | ||
[[Category:Digital]] | [[Category:Digital]] | ||
[[Category:iOS SDK Reference]] | [[Category:iOS SDK API Reference]] | ||
== Syntax == | == Syntax == | ||
Line 12: | Line 12: | ||
== Init JSON == | == Init JSON == | ||
* Call <code>initWithAppInfo:delegate:</code> to initialize a Nielsen App SDK object. | * Call <code>initWithAppInfo:delegate:</code> to initialize a Nielsen App SDK object. | ||
* The complete list of arguments that can be passed via the AppInfo JSON schema for the API are as follows. | |||
* The | |||
** The appid is provided by the Nielsen Technical Account Manager (TAM). The appid is a GUID data type and is specific to the application. | ** The appid is provided by the Nielsen Technical Account Manager (TAM). The appid is a GUID data type and is specific to the application. | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Parameter / Argument !! Description !! | ! Parameter / Argument !! Description !! Source !! Required? !! Example | ||
|- | |- | ||
| appid || Unique id for the application assigned by Nielsen. It is GUID data type. | | appid || Unique id for the application assigned by Nielsen. It is GUID data type. | ||
Line 23: | Line 22: | ||
* Use Production appid to submit app to App / Play store, after receiving Nielsen certification. | * Use Production appid to submit app to App / Play store, after receiving Nielsen certification. | ||
|| Nielsen-specified || Yes || PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | || Nielsen-specified || Yes || PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | ||
|- | |- | ||
| sfcode || Nielsen collection facility to which the SDK should connect. | | sfcode || Nielsen collection facility to which the SDK should connect. | ||
'''DTVR''' | '''DTVR''' | ||
* "us" for production | * "us" for production | ||
'''DCR''' | '''DCR''' | ||
* "dcr" for production | * "dcr" for production | ||
|| Nielsen-specified || Yes || dcr | |||
|| Nielsen-specified || Yes || dcr | |||
|- | |- | ||
| longitude || This value will not be overwritten by SDK for International (Germany). || Client-defined || No || 123.22 | | longitude || This value will not be overwritten by SDK for International (Germany). || Client-defined || No || 123.22 | ||
Line 47: | Line 37: | ||
|- | |- | ||
| ccode || If Country Code is provided by the app, it should be done after consultation with the Technical Account Manager. || Client-defined || No || 456 | | ccode || If Country Code is provided by the app, it should be done after consultation with the Technical Account Manager. || Client-defined || No || 456 | ||
|- | |||
| hem_sha256 || SHA256-hashed email address (client-supplied unique 32-character hexadecimal string) || Client-defined || No || tMmiiTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf/F5HVRQ= | |||
|- | |||
| hem_sha1 || SHA1-hashed email address (client-supplied unique 32-character hexadecimal string) || Client-defined || No || XvBniTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf/F5HVRQ= | |||
|- | |||
| hem_md5 || MD5-hashed email address (client-supplied unique 32-character hexadecimal string) || Client-defined || No || JnIbdTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf/F5HVRQ= | |||
|- | |||
| uid2 || An identifier based on a user’s verifiable PII (e.g. hashed email). UID2.0 was initially created by The Trade Desk (TTD) and is now managed by Prebid. || Client-defined || No || MTKVpUAzwYAPnHrtfE0wlINOMzhU7UUEjjVdCdRu63k= | |||
|- | |||
| uid2_token || Encrypted Unified ID 2.0 || Client-defined || No || AgAAAAPFR0zA5ogv/yaAPiUsAdZPsfqS8Ql | |||
DSGxAB+rr8yekFs3AjLYVk5qqqiyV2XHbSuwzHmxSlLeQeK | |||
QI1mp015jsNnpX5/xGgXldcgVz+gFnyh3T8/3agMwRmyrhC | |||
xG4oH2C7fc48AQk2eotE7FW0ZDEYM8fD9ZxDaxFUC/OV3OuZA& | |||
|- | |||
|luid | |||
|Living Unit ID - Experian Household ID | |||
'''Note: This parameter is applicable only for CTV and First Party Livestream data''' | |||
|Client-defined | |||
|No | |||
|B0EOFEDgD | |||
|} | |} | ||
Line 63: | Line 74: | ||
** '''DEBUG''': Debug logs, used by the developers to debug more complex issues. | ** '''DEBUG''': Debug logs, used by the developers to debug more complex issues. | ||
{{iOS_init_example}} | |||
Once the flag is active, it logs each API call made and the data passed. The log created by this flag is minimal. | Once the flag is active, it logs each API call made and the data passed. The log created by this flag is minimal. | ||
Line 89: | Line 91: | ||
@"sfcode": @"dcr", | @"sfcode": @"dcr", | ||
@"appid": @"PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", | @"appid": @"PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
|- | |- | ||
Line 97: | Line 97: | ||
@"sfcode": @"dcr", | @"sfcode": @"dcr", | ||
@"appid": @"PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", | @"appid": @"PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", | ||
@"longitude": @"123.22", | @"longitude": @"123.22", | ||
@"latitude": @"-223.32", | @"latitude": @"-223.32", |
Latest revision as of 00:08, 13 June 2024
Syntax
– (instancetype)initWithAppInfo:(id)appInfo delegate:(id)delegate;
Here, appInfo
is a JSON formatted string or NSDictionary object that includes identification of the app.
Init JSON
- Call
initWithAppInfo:delegate:
to initialize a Nielsen App SDK object. - The complete list of arguments that can be passed via the AppInfo JSON schema for the API are as follows.
- The appid is provided by the Nielsen Technical Account Manager (TAM). The appid is a GUID data type and is specific to the application.
Parameter / Argument | Description | Source | Required? | Example |
---|---|---|---|---|
appid | Unique id for the application assigned by Nielsen. It is GUID data type.
|
Nielsen-specified | Yes | PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
sfcode | Nielsen collection facility to which the SDK should connect.
DTVR
DCR
|
Nielsen-specified | Yes | dcr |
longitude | This value will not be overwritten by SDK for International (Germany). | Client-defined | No | 123.22 |
latitude | This value will not be overwritten by SDK for International (Germany). | Client-defined | No | -123.22 |
dma | Nielsen Designated Market Area code. DMA must be the Nielsen DMA value. Please check with the Technical Account Manager. | Client-defined | No | 123 |
ccode | If Country Code is provided by the app, it should be done after consultation with the Technical Account Manager. | Client-defined | No | 456 |
hem_sha256 | SHA256-hashed email address (client-supplied unique 32-character hexadecimal string) | Client-defined | No | tMmiiTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf/F5HVRQ= |
hem_sha1 | SHA1-hashed email address (client-supplied unique 32-character hexadecimal string) | Client-defined | No | XvBniTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf/F5HVRQ= |
hem_md5 | MD5-hashed email address (client-supplied unique 32-character hexadecimal string) | Client-defined | No | JnIbdTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf/F5HVRQ= |
uid2 | An identifier based on a user’s verifiable PII (e.g. hashed email). UID2.0 was initially created by The Trade Desk (TTD) and is now managed by Prebid. | Client-defined | No | MTKVpUAzwYAPnHrtfE0wlINOMzhU7UUEjjVdCdRu63k= |
uid2_token | Encrypted Unified ID 2.0 | Client-defined | No | AgAAAAPFR0zA5ogv/yaAPiUsAdZPsfqS8Ql
DSGxAB+rr8yekFs3AjLYVk5qqqiyV2XHbSuwzHmxSlLeQeK QI1mp015jsNnpX5/xGgXldcgVz+gFnyh3T8/3agMwRmyrhC xG4oH2C7fc48AQk2eotE7FW0ZDEYM8fD9ZxDaxFUC/OV3OuZA& |
luid | Living Unit ID - Experian Household ID
Note: This parameter is applicable only for CTV and First Party Livestream data |
Client-defined | No | B0EOFEDgD |
Return Values
The application should check for valid return values like:
- Initialized
NielsenAppApi
object of type id. - NIL object, if the initialization failed
Note: The minimum version supported by SDK is iOS 7. The app may not compile or the call to initWithAppInfo:delegate: will fail if Nielsen App SDK is initialized on devices with iOS versions 6.x and earlier.
Debug flag for development environment
Player application developers / integrators can use Debug flag to check whether an App SDK API call made is successful. To activate the Debug flag,
- Pass the argument
@"nol_devDebug":@"INFO"
, in the JSON string forinitWithAppInfo:delegate:
, as below. The permitted values are- INFO: Displays the API calls and the input data from the application (validate player name, app ID, etc.). It can be used as certification Aid.
- WARNING: Indicates potential integration / configuration errors or SDK issues.
- ERROR: Indicates important integration errors or non-recoverable SDK issues.
- DEBUG: Debug logs, used by the developers to debug more complex issues.
Example
NSDictionary* appInformation = @
{
@"sfcode": @"dcr",
@"appid": @"PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
@"hem_MD5": @"dea036a534e3cfb72cb786d48eae0fd4",
@"hem_sha1": @"7e77fc5552938f67f5071ce99ec0cb058c2b1c7c",
@"hem_sha256": @"e46f3f2c8c0e1d509aeb04d2fd78f0481c8520cb6769c258a50ddb98b073dabc",
@"uid2": @"MTKVpUAzwYAPnHrtfE0wlINOMzhU7UUEjjVdCdRu63k=",
@"uid2_token": @"AgAAAAPFR0zA5ogv/yaAPiUsAdZPsfqS8Ql
DSGxAB+rr8yekFs3AjLYVk5qqqiyV2XHbSuwzHmxSlLeQeK QI1mp015jsNnpX5/xGgXldcgVz+gFnyh3T8/3agMwRmyrhC xG4oH2C7fc48AQk2eotE7FW0ZDEYM8fD9ZxDaxFUC/OV3OuZA&",
@"nol_devDebug": @"INFO"
};
nlsAppApiMeter = [[NielsenAppApi alloc] initWithAppInfo:appInformation delegate:self];
Once the flag is active, it logs each API call made and the data passed. The log created by this flag is minimal.
Note: DO NOT activate the Debug flag in a production environment.
Sequence Diagram
Examples
SDK init JSON call | Example |
---|---|
JSON with basic application information | NSDictionary *appInformation = @
{
@"sfcode": @"dcr",
@"appid": @"PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
}
|
JSON with optional Longitude and Latitude | NSDictionary *appInformation = @
{
@"sfcode": @"dcr",
@"appid": @"PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
@"longitude": @"123.22",
@"latitude": @"-223.32",
@"dma": @"123",
@"ccode": @"456"
}
|