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.
Prerequisites
Mapp Engage iOS SDK v6.0+, integrated and tested for push notifications.
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. Add the inapp block alongside the standard Engage keys:
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>app_id</key>
<string>YOUR_APP_ID</string>
<key>dmc_system_id</key>
<string>YOUR_DMC_SYSTEM_ID</string>
<key>sdk_key</key>
<string>YOUR_SDK_KEY</string>
<key>jamie_url</key>
<string>https://your-jamie-host.example.com</string>
<key>is_eu</key>
<true/>
<key>open_landing_page_inside_app</key>
<true/>
<key>inapp</key>
<dict>
<key>media_timeout</key>
<integer>5</integer>
</dict>
</dict>
</plist>Add the In-App framework to Xcode
Copy the
AppoxeeInapp.frameworkandAppoxeeInappResources.bundlefiles into your project directory.In Xcode, go to Build Phases > Link Binary With Libraries and add both files.
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;
}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.
Keep in mind:
The
media_timeoutentry inside theinappdictionary inAppoxeeConfig.plistsets the default timeout (in seconds) used by the In-App SDK when fetching media for a message.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.