Prerequisites
Enabling In-App messages in SDK
- Set the flag
enableInApptotruewhen initializing the SDK
- User Registration
Triggering In-App SDK events
In-App messages are typically shown in response to events that happen within your app. You can decide the trigger event for in-app display when creating the campaign. By default SDK tracksapp_opened and page_viewed events. Note that these events
are not reported to our sever and is used only to determine if an in-app needs to be shown or not.
If you want to use a custom event as the trigger event, SDK provides a method to raise such an event based on a user action within your app.
- eventName : name of the custom event.
- params : event parameters as a key value pair
- showLog : a flag to enable showing the log of the event
Skipping InApps in Activity
This is useful when you want to skip showing InApps when user is on specific screens within your app. For e.g. Splash screens, Checkout screen, etc. You can add a list of view controllers you want to exclude from InApp notifications by adding a key in the plistCastledExcludedInAppViews.
The recommended approach for iOS, especially if you are using custom root view controllers other than the default UINavigationController or UITabBarController, is to use the following Managing InApp Rendering methods.
Managing InApp Rendering
You can use the following methods to override the default InApp behaviour.Pausing InApp
Resuming InApp
Stopping InApps
resumeInApp is invoked. Unlike pauseInApp,
stopInApp completely stops evaluating the trigger condition for displaying InApp and all InApp that would have been displayed otherwise would be ignored.