Avatar

Correct answer by
Community Advisor

Core Implementation and Lifecycle

Include Additional Data with Lifecycle Calls

To include additional data with lifecycle metric calls, use collectLifecycleDataWithAdditionalData:

Important: Any data that is passed to the SDK through collectLifecycleDataWithAdditionalData: will be persisted in NSUserDefaults by the SDK. The SDK strips the values in the NSDictionary parameter that are not of the NSString or NSNumber types.

  1. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

  2.    NSMutableDictionary *contextData = [NSMutableDictionary dictionary];

  3.    [contextData setObject:@"Game" forKey:@"myapp.category"];

  4.    [ADBMobile collectLifecycleDataWithAdditionalData:contextData];

  5.    return YES;

  6. }

View solution in original post