Overview
In-app messages support:- Location-triggered messaging: Show messages when users enter geofences or approach destinations
- Rich content: Display titles, body text, images, and call-to-action buttons
- Custom styling: Customize colors, fonts, and layout
- Deep linking: Navigate users to specific screens in your app
- Conversion tracking: Automatically track message displays, dismissals, and button clicks
Setup
The SDK automatically manages in-app messages when location events occur. No additional setup is required beyond initializing the SDK.In-app messages require iOS 13.0 or later and are available starting with SDK version 3.10+.
Configure messages in the dashboard
Create in-app messages in the Radar dashboard by adding message metadata to your geofences or campaigns:Message structure
An in-app message consists of:Text properties
Button properties
Image properties
Customize message presentation
Implement theRadarInAppMessageProtocol to customize message presentation:
Show messages programmatically
Manually display in-app messages:Conversion tracking
The SDK automatically tracks in-app message conversions:
Conversions include metadata:
displayDuration: How long the message was shown (seconds)campaignId: Campaign identifiercampaignName: Campaign namegeofenceId: Triggering geofence ID
Handle deep links
Process deep links from message buttons:Message display rules
The SDK follows these rules for displaying messages:- Only one message is shown at a time
- New messages are ignored while a message is currently displayed
- Messages are shown on the app’s key window
- Messages are displayed with a semi-transparent background overlay
- Users can dismiss messages by tapping outside the message view
Best practices
Keep messages concise
Use short, actionable text that users can quickly read and understand.
Test on different devices
Verify messages display correctly on various screen sizes and iOS versions.
Use high-quality images
Optimize images for mobile and provide appropriate resolutions for retina displays.
Implement deep links
Always provide a button with a deep link to make messages actionable.
Example: Complete implementation
Troubleshooting
Messages not appearing
Messages not appearing
- Verify iOS version is 13.0 or later
- Check that messages are configured correctly in the dashboard
- Ensure the app has a key window available
- Verify the delegate is set on the main thread
- Check that no other message is currently being displayed
Custom delegate not being called
Custom delegate not being called
- Ensure the delegate is set using
RadarInAppMessageManager.shared.setDelegate() - Verify the delegate is set on the main thread with
@MainActor - Check that the delegate is retained (not deallocated)
Deep links not working
Deep links not working
- Verify the deep link URL format is correct
- Ensure your app’s URL scheme is registered in Info.plist
- Check that you’re handling the deep link in
onInAppMessageButtonClicked