Category

iOS SDK API Reference: Difference between revisions

From Engineering Client Portal

(Created page with "{{Breadcrumb|}} {{Breadcrumb|Digital}} {{CurrentBreadcrumb}} Category:Digital == IOS SDK API Methods & Properties == {| class="wikitable sortable" |- ! Scenario !! Method...")
 
(Redirected page to iOS SDK API Reference)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Breadcrumb|}} {{Breadcrumb|Digital}} {{CurrentBreadcrumb}}
#REDIRECT [[iOS SDK API Reference]]
[[Category:Digital]]
 
== IOS SDK API Methods & Properties ==
{| class="wikitable sortable"
|-
! Scenario !! Method / Property !! DTVR !! DAR !! Digital Audio !! DCR !! International (Germany) !! Description
|-
| Initialize || [[initWithAppInfo:delegate:]] || ✔ || ✔ || ✔ || ✔ || ✔ || Used to create a new instance of the SDK object
|-
| Measurement || [[play]] || ✔ || ✔ || ✔ || ✔ || ✔ || Used when there is an ID3 fed product such as DTVR and the client does not want to send in all the CMS metadata that is sent in loadMetadata. This allows the client to send in at least the required “channel name” value associated to the ID3 feed. If this is not called then the “channel name” value populated will be the default value of “defaultChannelName”.
|-
| Measurement || [[loadMetadata]] || ✔ || ✔ || ✔ || ✔ || ✔ || Used to send ad or content metadata to the SDK in the form of JSON string. Application constructs a JSON hashmap and calls this API.
|-
| Measurement || [[sendID3]] || ✔ || ✘ || ✘ || ✘ || ✘ || Used to send the ID3 metadata.
|-
| Measurement || [[playheadPosition]] || ✘ || ✘ || ✔ || ✔ || ✔ || Used to send the playhead position.
|-
| Measurement || [[stop]] || ✔ || ✘ || ✔ || ✔ || ✔ || Used when content playback is complete. This is triggered 1) at the end of the content stream, 2) if the user switches to another piece of content
|-
| Measurement || [[end]] || ✔ || ✔ || ✔ || ✔ || ✔ || Used to notify App SDK that the remote OTT device (like Google ChromeCast, Roku, Amazon FireTV, etc.) is connected / disconnected (change of OTT status).
|-
| Measurement || [[updateOTT]] || ✘ || ✘ || ✘ || ✘ || ✔ || Used to notify App SDK that the remote OTT device (like Google ChromeCast, Roku, Amazon FireTV, etc.) is connected / disconnected (change of OTT status).
|-
| Opt-out || [[optOutURL]] || ✔ || ✔ || ✔ || ✔ || ✔ || Used to fetch the Nielsen opt-out web page URL.
|-
| Opt-out || [[userOptOut]] || ✔ || ✔ || ✔ || ✔ || ✔ || Used to supply the response message from opt-out webpage to the SDK.
|-
| Opt-out || [[optOutStatus]] || ✔ || ✔ || ✔ || ✔ || ✔ || Call this API to retrieve the Opt-Out or Opt-In state.
|-
| Opt-out || [[appDisableApi]] (kill switch) || ✔ || ✔ || ✔ || ✔ || ✔ || Used to enable / disable the SDK.
|-
| Log || [[lastErrorDict]] || ✔ || ✔ || ✔ || ✔ || ✔ || Returns SDK error in the form of dictionary if any error has occurred.
|-
| Log || [[lastEventDict]] || ✔ || ✔ || ✔ || ✔ || ✔ || Returns SDK event in the form of dictionary if any event has occurred.
|-
| Log || [[meterVersion]] || ✔ || ✔ || ✔ || ✔ || ✔ || Returns the current SDK version.
|-
| Log || [[nielsenId]] || ✔ || ✔ || ✔ || ✔ || ✔ || Used to get a string defining the Nielsen ID (NUID) number for the device.
|-
| Log || [[demographicId]] || ✔ || ✔ || ✔ || ✔ || ✔ || Used to retrieve Demographic ID (Device ID) of the current device.
|-
| Log || [[debug]] || ✔ || ✔ || ✔ || ✔ || ✔ || Used to enable/disable debug flags. Newly introduced in SDK version 5.0.0 for International (Germany)
|}
 
== NielsenAppApi Class Description ==
The NielsenAppApi class is the primary application interface to the Nielsen App SDK. For example, after an instance object of the NielsenAppApi class is created and initialized, it can be used by the calling application to collect HLS timed metadata using the SDK’s [[sendID3]]: method. These are the public methods and properties exposed by the NielsenAppApi class:
<syntaxhighlight lang="objective-c">
@interface NielsenAppApi: NSObject
 
  @property (readonly) BOOL optOutStatus;
  @property (assign) BOOL appDisableApi;
  @property (assign) BOOL debug;
  @property (readonly) NSString *nielsenId;
  @property (readonly) NSString *demographicId;
  @property (readonly) NSString *optOutURL;
  @property (readonly) NSString *meterVersion;
  @property (readonly) NSDictionary *lastEventDict;
  @property (readonly) NSDictionary *lastErrorDict;
 
  – (instancetype)initWithAppInfo:(id)appInfo delegate:(id)delegate;
 
  – (void)play:(id)channelInfo;
  – (void)loadMetadata:(id)metadata;
  – (void)stop;
  – (void)end;
  – (void)playheadPosition:(long long)playheadPos;
  – (void)sendID3:(NSString *)data;
  – (void)updateOTT:(id)ottInfo;
  – (BOOL)userOptOut:(NSString *)optOut;
 
  – (NSString *)getNielsenId _attribute((deprecated((“Please use nielsenId property instead.”))));
  – (NSString *)optOutURLString _attribute((deprecated((“Please use optOutURL property instead.”))));
  – (NSString *)getMeterVersion _attribute((deprecated((“Please use meterVersion property instead.”))));
  – (NSDictionary *)getLastEventDict _attribute((deprecated((“Please use lastEventDict property instead.”))));
  – (NSDictionary *)getLastErrorDict _attribute((deprecated((“Please use lastErrorDict property instead.”))));
 
  @protocol NielsenAppApiDelegate<NSObject>
 
  @optional
  – (void)nielsenAppApi:(NielsenAppApi *)appApi eventOccurred:(NSDictionary *)event;
  – (void)nielsenAppApi:(NielsenAppApi *)appApi errorOccurred:(NSDictionary *)error;
 
@end
</syntaxhighlight>

Latest revision as of 07:44, 23 May 2017