Hello Community,
We are currently facing a weird issue with our mobile app tracking. we've noticed that most of the life cycle metrics are not being tracked as shown below. Nothing is actually being tracked other than "app users". This issue is only with our iOS app
We have verified the code and followed the instructions as mentioned in launch (screenshot below). We have also updated the sdk pods to the new versions (5.0):
We have also checked this documentation (https://developer.adobe.com/client-sdks/home/base/mobile-core/lifecycle/#add-lifecycle-to-your-app) to see if we are missing anything but we couldn't find any issue with the code.
The only thing which we noticed is different on our code vs the instruction is that in the below line of code where "additionalContextData:" mentioned as "nil". On the launch instructions, it is mentioned as "MobileCore.lifecycleStart(additionalContextData: ["contextDataKey": "contextDataVal"])" .
Would really appreciate if someone can help me with debugging this issue. Thanks alot!
Views
Replies
Total Likes
Hey @vallus additionalConextData:nil shouldn't be the problem here as this is an optional parameter to pass a dictionary of additional data that will be attached to the lifecycle event.
I suspect it something else. Do you see any sort of errors in the debug logs? If we can get logs from the App it can provide more clarity on the issue. I would suggest to log client care ticket with Mobile Launch property details, configuration details and the debug logs. If you can create an Assurance session that would be helpful too.
Here's how you can setup Assurance - https://experienceleague.adobe.com/en/docs/platform-learn/implement-mobile-sdk/app-implementation/as...
Views
Replies
Total Likes
Honestly, several years ago when our developers attempted to add context variables to our lifecycle calls on the ACP SDK they broke lifecycle metrics... we removed it and lifecycle started working again...
We haven't yet gone back to trying to add context to Lifecycle again (other priorities)..
So while it shouldn't be causing the problem, it might actually be the problem....
Views
Replies
Total Likes
I haven't tested passing additional context data in lifecycle calls, but if it breaks the lifecycle metrics then this is definitely something that can be checked internally.
Views
Replies
Total Likes
Thanks @Jennifer_Dungan and @fhusain for inputs!
I tried both contextData: nil and also with contextData key value pairs, but both dint fix the issue. Im still not sure what is causing the issue.
Views
Replies
Total Likes
I think we would need logs, if configuration is correct then there must be something within the app blocking the calls. Apart from lifecycle calls, do you see any other data making to the reports from iOS App?
Views
Replies
Total Likes
Yes, I can see all the variables being captured. For example: PageType, appType etc.., these are part of the state calls.
Views
Replies
Total Likes
What happens if you try:
MobileCore.lifecycleStart(null);
Does that make any difference?
Views
Replies
Total Likes
We can try this but is this for iOS? We only have issue with our iOS app.
Views
Replies
Total Likes
Depending on your app? If you are using a shared code base it might be harder... but if you have separate iOS and Android versions then you should be able to make platform specific versions...
Of course, it it comes to needing context variables on your Lifecycle calls... that will be another challenge... but if you aren't using that now, and are just passing empty values... it's worth a shot?
Good Luck
Views
Replies
Total Likes
Sorry, i meant the syntax which you've mentioned looks like is used for Android as per the documentation (https://developer.adobe.com/client-sdks/home/base/mobile-core/lifecycle/api-reference/)
Android:
iOS:
For iOS the syntax was mentioned as below. So, i'm just wondering if passing "null" would work for iOS swift.
Can you double check the syntax? I see some differences in the snippet that you have added in the question description. Can you double the check the parenthesis.
MobileCore.registerExtensions(extensions, {
MobileCore.configureWith(appId: self.LAUNCH_ENVIRONMENT_FILE_ID)
if appState != .background {
MobileCore.lifecycleStart(additionalContextData: nil)
}
})
Here's the sample code for the test app provided by Adobe to show the usage of Lifecycle extension - https://github.com/adobe/aepsdk-core-ios/blob/main/TestApps/TestApp_Swift/AppDelegate.swift
Ah, you are correct... I must have grabbed the wrong version... I don't have access to our mobile app code, so I can't see what our syntax is...
But I did find https://github.com/Adobe-Marketing-Cloud/aep-sdks-documentation/blob/master/foundation-extensions/mo...
And it still has:
ACPCore.LifecycleStart(null);
but maybe that's only for APC and not AEP??
Views
Replies
Total Likes
Views
Likes
Replies