Goal
Manually integrate the Mapp Engage SDK into your iOS app using Objective-C.
Note:
This guide covers manual integration for advanced users who need greater customization.
For basic integration, see the Basic Automated Setup.
Prerequisites
Before starting, ensure you have:
Xcode with:
A base SDK of iOS 12 or above
A deployment target of iOS 12 or above
A Mapp Engage Account with the mobile channel activated.
Required permissions configured in your app's
Info.plist.
Procedure
Download the SDK.
Add the SDK to Your Project
Drag
AppoxeeSDK.xcframeworkinto your project.
Import the SDK in AppDelegate
Open your
AppDelegate.mfile and add:#import <AppoxeeSDK/AppoxeeSDK.h>Declare the delegate in
@interface:@interface AppDelegate() <AppoxeeNotificationDelegate> @end
Initialize the SDK: Add the following to the
application:didFinishLaunchingWithOptions:method:- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[Appoxee shared] engageWithLaunchOptions:launchOptions andDelegate:self andSDKID:@"xxx.xxx" with:L3]; // Insert other initialization code or other Frameworks code here. return YES; }Replace
xxx.xxxwith the SDK Key configured in your Mapp Engage Channel Configuration.The
withparameter is theSERVERenum. Customer-facing values areL3,EMC,EMC_US, andCROC. Your account manager will tell you which one to use.
Note:
The
SERVERenum also definesTEST,TEST55, andTEST61values. These are internal test environments and are not meant for production use.Handle Notifications: Implement the following methods to handle push notifications:
Register Device Token:
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { [[Appoxee shared] didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; }Receive Remote Notifications:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { [[Appoxee shared] receivedRemoteNotification:userInfo]; completionHandler(UIBackgroundFetchResultNewData); }
Custom Delegate (Optional): Handle custom push actions by implementing:
#pragma mark - AppoxeeNotificationDelegate - (void)appoxee:(Appoxee *)appoxee handledRemoteNotification:(APXPushNotification *)pushNotification andIdentifer:(NSString *)actionIdentifier { // A push notification was received and processed. }Warning:
The selector
appoxee:handledRemoteNotification:andIdentifer:contains a typo (Identiferwithout the secondi) in the public header. Use the selector exactly as shown — it matches the symbol exported byAppoxeeSDK.xcframework.
Troubleshooting
Framework Not Found: Ensure the framework is linked correctly in the "Build Phases" tab of your Xcode project.
Push Notifications Not Working: Double-check your APNs certificate and Mapp Engage Dashboard settings.
Compile Errors: Confirm import paths and SDK version compatibility.