Configure In-App Messaging
Configuring In-App Messaging
You can enable and configure in-app messages within your application for both iOS and Android.
To enable in-app messaging, follow these steps:
- Enable in-app messaging by setting the
enable_in_app_messagingparameter totruein yourhydra-config.jsonfile. - Configure in-app messaging for iOS
- Add an Image Set named
inAppPlaceholderin your project'sAssets.xcassets. This image will serve as a placeholder when an in-app message does not include an image. - In your
AppDelegate.swiftfile, add the following at the top:import capillary_hydra_ios - Add the following function to your
AppDelegate.swiftfile:override func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void){ HydraNativeAPI.shared.application(application, didReceiveRemoteNotification: userInfo, fetchCompletionHandler: completionHandler) }
- Add an Image Set named
- Configure in-app messaging for Android
- Add an image file named
hydra_in_app_placeholderto theandroid/app/src/main/res/drawablefolder. This image will be used as a placeholder when an in-app message does not include an image. The image file can be in PNG, JPG, or XML format.
- Add an image file named
Updated 4 months ago
