Overview
This guide explains the step-by-step process for integrating the In-App Messaging SDK into your iOS application. Before proceeding with the In-App Messaging SDK, complete the initial iOS Engage SDK integration and verify that push notifications are working.
Note
The In-App Messaging SDK (
AppoxeeInapp) is a separate framework from the Mapp Engage push SDK (Appoxee). It is shipped under its own xcframework and is not contained in the Engage iOS SDK repository. Configuration is done through the sameAppoxeeConfig.plistthe Engage SDK uses.
Distribution
The In-App SDK (MappSDKInapp) is distributed separately from the push SDK (MappSDK) and requires it as a dependency.
CocoaPods — add both
pod 'MappSDK'andpod 'MappSDKInapp'to yourPodfile.Swift Package Manager — available since version 6.0.7.
Manual — add
AppoxeeInapp.xcframework,AppoxeeInappResources.bundle, andMappSDKInappPrivacy.bundleto your project.
Since version 6.0.13, the In-App SDK includes a Privacy Manifest (PrivacyInfo.xcprivacy in MappSDKInappPrivacy.bundle). With Swift Package Manager and CocoaPods, it is added automatically.
Source repository: Github
For release history, see the In-App SDK Changelog.
Prerequisites
Mapp Engage iOS SDK v6.0+, integrated and tested for push notifications.
Minimum supported iOS version: iOS 16.0 or later. The Engage push SDK alone supports iOS 12.0 or later.
Xcode environment for iOS app development.
The following values from your Mapp Cloud account manager, set in
AppoxeeConfig.plist:app_id— App ID from Mapp Engage Channel Management.dmc_system_id— Mapp Engage tenant/system ID.sdk_key— SDK key for your application.jamie_url— In-App caching/delivery host (formerly referred to as the "CEP URL").
Procedure
Configure AppoxeeConfig.plist
The In-App SDK reads the same AppoxeeConfig.plist as the Engage SDK. The standard Engage keys are in the sdk dictionary, the In-App settings are in the inapp dictionary:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>inapp</key>
<dict>
<key>custom_fields</key>
<array>
<string>customString</string>
<string>customNumber</string>
<string>customDate</string>
</array>
<key>media_timeout</key>
<integer>5</integer>
</dict>
<key>sdk</key>
<dict>
<key>app_id</key>
<string>YOUR_APP_ID</string>
<key>dmc_system_id</key>
<integer>12345</integer>
<key>sdk_key</key>
<string>YOUR_SDK_KEY</string>
<key>jamie_url</key>
<string>your-jamie-host.example.com</string>
<key>is_eu</key>
<true/>
<key>open_landing_page_inside_app</key>
<false/>
</dict>
</dict>
</plist>Configuration parameters
Key | Type | Description |
|---|---|---|
| String | App ID of your app, shown in Mapp Engage under Administration > Channels. Each app has its own App ID. |
| Integer | ID of your Mapp Engage system (tenant). Provided by your Mapp Cloud account manager or project manager. |
| String | SDK key of your app, shown in Mapp Engage under Administration > Channels. Each app has its own SDK key. |
| String | Hostname of the In-App message backend assigned to your tenant (formerly referred to as the "CEP URL"). |
| Boolean |
|
| Boolean | If |
| Array of String | Names of custom attributes to expose as targeting variables for In-App messages. |
| Integer | Default timeout in seconds that the In-App SDK uses when fetching media for a message. |
Add the In-App framework to Xcode
If you integrate the SDK manually:
Copy
AppoxeeInapp.xcframework,AppoxeeInappResources.bundle, andMappSDKInappPrivacy.bundleinto your project directory.In Xcode, add
AppoxeeInapp.xcframeworkunder Build Phases > Link Binary With Libraries and both bundles under Build Phases > Copy Bundle Resources.
Initialize the SDK
Call engageWithDelegate:with: in application:didFinishLaunchingWithOptions:. The with parameter is the same SERVER enum used by the Engage SDK — customer-facing values are L3, EMC, EMC_US, and CROC.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
AppoxeeInapp.shared()?.engage(withDelegate: nil, with: .EMC)
return true
}- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[AppoxeeInapp shared] engageWithDelegate:nil with:EMC];
return YES;
}Load the In-App resources (Swift Package Manager only)
If you integrate the SDK via Swift Package Manager, call MappInappResources.configure() before you initialize the In-App SDK:
import Mapp_Engage_iOS_SDK_Inapp_AddOn
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
MappInappResources.configure()
AppoxeeInapp.shared()?.engage(withDelegate: nil, with: .EMC)
return true
}Custom resource bundle (optional): If you customize the In-App message styling, for example customFont.css or close button images, and ship these files in your own bundle, pass that bundle with AppoxeeInapp.configure(withResourceBundle:) (Swift) or [AppoxeeInapp configureWithResourceBundle:] (Objective-C).
Trigger Custom Events
Custom trigger events let you fire in-app messages from app behaviour, for example "Open Cart" or "Checkout Started".
import AppoxeeInapp
AppoxeeInapp.shared()?.reportInteractionEvent(withName: "Event_Name", andAttributes: ["key": "value"])#import <AppoxeeInapp/AppoxeeInapp.h>
[[AppoxeeInapp shared] reportInteractionEventWithName:@"Event_Name"
andAttributes:@{@"key": @"value"}];Register Custom Events
Register the event names you trigger from the app via the registerAppEvents API in Mapp Cloud so they are available as triggers in the In-App campaign editor.
In-App Message Types
The SDK supports three in-app message types:
1. Full-Screen Message
Covers the entire screen.
Dismissal: 'X' icon at the top-right corner.
2. Modal Message
Displayed in a popup.
Portrait orientation only.
Dismissal: 'X' icon at the top-right corner.
3. Banner Message
Displayed at the top or bottom of the screen.
Portrait orientation only.
Dismissal: 'X' icon at the top-right corner.
Note
The Plist keys (
app_id,dmc_system_id,sdk_key,jamie_url) are read by both the Engage SDK and the In-App SDK — keep a single shared file rather than maintaining two copies.Work with your Mapp Cloud account manager for production values and channel-specific configuration.