In-App SDK Integration for iOS (Mapp Cloud)

This document explains how to download the In App Messaging SDK and steps to integrate the application in iOS Native application. 

After the iOS SDK Integration Documentation and testing the pushes on the device the next step will be of adding In App Messaging SDK.

 

iOS SDK Version Info

In-App SDK integration is supported with iOS SDK v5.0+

 

Configure iOS SDK for In-App Cache Service

In order to integrate your app with the In-App Messaging cache service, you will need to configure the iOS plist file to include the 'Jamie URL' based on your Mapp Engage system ID number (tenant ID).. The Jamie URL varies by the location of your Mapp Engage system. Your Mapp account manager or project manager will provide this URL, system ID, AppID and SDK Keys to you during onboarding. 

You will need the following data added to the iOS plist file:

  • cepURL: This is the Jamie URL for caching and delivering In-App Messages. A Mapp Cloud account manager or project manager will provide this to you.

  • sdkKey: This is the SDK Key generated from the Mapp Engage Channel Management. There will be a different SDK Key for each app you have configured in your Mapp Engage environment. For example, customers with an Android development, Android Production, iOS development, and iOS production apps, will have four different SDK Keys. One for each app. A Mapp Cloud account manager or project manager will provide this to you. You can also view this in the Mapp Engage system under Administration > Channels. 

  • appID: This is the ID number of your app from the Mapp Engage Channel Management. There will be a different App ID for each app you have configured in your Mapp Engage environment. For example, customers with an Android development, Android Production, iOS development, and iOS production apps, will have four different App ID Keys. One for each app. A Mapp Cloud account manager or project manager will provide this to you. You can also view this in the Mapp Engage system under Administration > Channels. 

  • tenantID: This is the ID number of your Mapp Engage system. A Mapp Cloud account manager or project manager will provide this to you. 

 

Steps to integrate:

  1. Add the Mapp Engage Mobile iOS SDK to Xcode 

    1. Open SDK Folder and copy "AppoxeeInapp.framework" & "AppoxeeInappResources.bundle" folders. Paste these files in the folder structure.

    2. Reference these files in Build Phases -> Link Binary With Library. See attached screenshot.





  2. Add Below mentioned keys to AppoxeeConfig.plist. 

  •  

    • SDK System ID

      In the SDK Section of the plist:

 

<key>dmc_system_id</key> <integer>DMC Acccount ID</integer> <key>jamie_url</key> <string>URL to DMC Integrated account</string>

 

  •  

    • media_timeout: If there is no time out mentioned with the in app message then this timeout will be used for checking message time out

Add a section in the plist for Media_timeout 

<key>inapp</key> <dict> <key>media_timeout</key> <integer>[seconds for timeout e.g. 5]</integer> </dict>

 

Example:

 


Integration


Objective-C

Add the following implementation to the method named: application:didFinishLaunchingWithOptions:

 

Objective-C
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Method takes into consideration a valid AppoxeeConfig.plist file in your application. [[AppoxeeInapp shared] engageWithDelegate:nil with: eMC]; return YES; }

 

Swift

Add the following implementation to the method named: application:didFinishLaunchingWithOptions:

 

 

Swift

Parameter "with" represents enum SERVER that enables you to chose one of the four options:

l3

eMC

cROC

tEST

In-App Message call (Custom Trigger Events)

 

Custom Trigger Events are used to trigger when an In-App message is displayed. Common trigger events are "Open App", "Open Shopping Cart", "Open Inbox/Message Center". With custom trigger events, you can create events specific to your app. At a minimum, all apps require one Custom Trigger Event. The most common event is Open App. 

 

To create a custom trigger event in iOS, include the following call in your app. 

 

  1. Import  #import <AppoxeeInapp/AppoxeeInapp.h> to .m of the implementing class.

  2. Use below mentioned method to trigger the in app message

 

Objective C

 

Objective-C

 

Swift

Swift

 

To use the custom trigger event in an In-App Message, call the registerAppEvents API to load all custom trigger events. You must have an API user account setup in Mapp Engage to call the API. See In-App Custom Event Triggers API for Mapp Cloud for more details. 

In-App Message Types

Three type of In App Messages can be received on the device based on the template mapped to event in CEP.

Full Screen Message Type

The fullscreen In-App message covers the entire screen

   

Dismissal Options: 

  •  

    • 'X' icon at top Right

Modal Message Type

Modal type of In-App messages are displayed in a popup. 

    

 

Dismissal Options: 

 

  •  

    • 'X' icon at top Right

Screen Orientation:

  •  

    • Only portrait mode supported

 

Banner Message Type

Banner type of In-App messages are displayed in top or bottom of screen

  

 

Dismissal Options: 

  •  

    • 'X' icon at top Right

Screen Orientation:

  •  

    • Only portrait mode supported