Learn how to collect lifecycle data in a mobile app.
The Adobe Experience Platform Mobile SDK Lifecycle extension enables the collection lifecycle data from your mobile app. The Adobe Experience Platform Edge Network extension sends this lifecycle data to the Platform Edge Network where it is then forwarded to other applications and services according to your datastream configuration. Learn more about the Lifecycle extension in the product documentation.
In this lesson, you will:
Now you can update your project to register the lifecycle events.
Navigate to Luma > Luma > SceneDelegate in the Xcode Project navigator.
When launched, if your app is resuming from a background state, iOS might call your
sceneWillEnterForeground: delegate method and this is where you want to trigger a lifecycle start event. Add this code to
func sceneWillEnterForeground(_ scene: UIScene):
// When in foreground start lifecycle data collection
When the app enters the background, you want to pause lifecycle data collection from your app’s
sceneDidEnterBackground: delegate method. Add this code to
func sceneDidEnterBackground(_ scene: UIScene):
// When in background pause lifecycle data collection
The previous exercise dispatches the foreground and background events to Adobe Experience Platform Mobile SDK. To forward these events to Platform Edge Network:
Application Status for Name.
Once you have successfully built the property, the events are sent to Platform Edge Network, and the events are forwarded to other applications and services according to your datastream configuration.
You should see Application Close (Background) and Application Launch (Foreground) events containing XDM data in Assurance.
You have now set up your app to send application state (foreground, background) events to the Adobe Experience Platform Edge Network and all services you have defined in your datastream.
Thank you for investing your time in learning about Adobe Experience Platform Mobile SDK. If you have questions, want to share general feedback, or have suggestions on future content, share them on this Experience League Community discussion post
Next: Track event data