I compared iOS sdk with Android sdk and noticed that in iOS sdk isn't provided the ability to send additional context data with application lifecycle.
In Android sdk clearly stated that: To send additional context data with your lifecycle call by using Config.collectLifecycleData(Activity activity, Map<String, Object> contextData), you must override the onResume method for that Activity and ensure that you call super.onResume() after manually calling collectLifecycleData.
Is it possible for iOS?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Core Implementation and Lifecycle
Include Additional Data with Lifecycle Calls
To include additional data with lifecycle metric calls, use collectLifecycleDataWithAdditionalData:
NSMutableDictionary *contextData = [NSMutableDictionary dictionary];
[contextData setObject:@"Game" forKey:@"myapp.category"];
[ADBMobile collectLifecycleDataWithAdditionalData:contextData];
return YES;
Core Implementation and Lifecycle
Include Additional Data with Lifecycle Calls
To include additional data with lifecycle metric calls, use collectLifecycleDataWithAdditionalData:
NSMutableDictionary *contextData = [NSMutableDictionary dictionary];
[contextData setObject:@"Game" forKey:@"myapp.category"];
[ADBMobile collectLifecycleDataWithAdditionalData:contextData];
return YES;
Does the previous reply answer your question?
Views
Replies
Total Likes
is that collectLifecycleDataWithAdditionalData supposed to pass the data on future lifecycle calls or just the first lifecycle call after the install?
For me additional context data set in only sent in the first install lifecycle call. is there any additional instructions we are missing here?
Views
Replies
Total Likes
collectLifecycleDataWithAdditionalData can be used to pass additional data layer variables on all lifecycle calls including the first one after install and the subsequent ones in future.
For this functionality to work, you would need to follow the instructions in the below link and section “Include Additional Data with Lifecycle Calls”
https://marketing.adobe.com/resources/help/en_US/mobile/ios/dev_qs.html
Along with this, you will need to add the same collectLifecycleDataWithAdditionalData code into iOS applicationWillEnterForeground method as well. This is the part that helps send the additional data layer variables on the subsequent lifecycle calls after the first one.
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies