iOS SDK Basic Automatic Integration for Mapp Cloud

Goal

This topic covers an automatic integration (basic) where you just need to add one method to your project & plist configuration file.

For a manual method that gives you greater control, and lets you override behavior see Option 2 - Manual Integration In iOS App - Swift and Option 3 - Manual Integration In iOS App- Objective-C  

Download iOS SDK

To download the latest version of the iOS SDK, please visit Mapp Cloud Mobile Integration. Here you will find the latest SDK versions and example apps. 

Procedure

1. Add import statement

Objective-C

Open your AppDelegate.m file, and add the following import statement:


#import <AppoxeeSDK/AppoxeeSDK.h>


Swift

Add to your Objective-C bridging header the following import statement


#import <AppoxeeSDK/AppoxeeSDK.h>

2. Create AppoxeeConfig.plist file in your project


Mandatory

  1. Enter your SDK Key (SDK Key that was created when your App was configured in the system)
  2. Set the is_eu flag to YES or NO ( please contact your PS validate which DC you are hosted on)
    1. NO - Data Center is located in US
    2. YES - Data Center is located in EU
    3. Please note that if the above flag does not match your DC environment you will see the following error in your Xcode console

      [Appoxee Debug] Application Activated
      [Appoxee Error] Network protocol error with HTTP code: 403
      [Appoxee Error] Network protocol error with HTTP code: 403

Optional

  • If you want landing page to open inside the app, set open_landing_page_inside_app to true



AppoxeeConfig.plist


<?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>263177</string>
		<key>dmc_system_id</key>
		<integer>55</integer>
		<key>sdk_key</key>
		<string>5c59a5b6b52eb2.62524838</string>
		<key>jamie_url</key>
		<string>jamie-test.shortest-route.com</string>
		<key>is_eu</key>
		<true/>
		<key>open_landing_page_inside_app</key>
		<false/>
	</dict>
</dict>
</plist>



Additional Behaviours that can be Applied

Push Permission Auth Dialog:Please note that the "Request Push notification permission" dialog will be called on first app lunch. In order to show the dialog based on your own logic refer to:/wiki/spaces/MIC/pages/430448

Handle Foreground Notifications:From OS 10, you can decided whether notifications will be displayed when app is in the foreground. Default behaviour will be that notifications are not displayed when app is in the foreground, see details on Handle Foreground Notification

Becoming UNUserNotificationCenterDelegate:If you choose to become UNUserNotificationCenterDelegate, it will require you to forward its delegate methods to Appoxee.See details on Becoming UNUserNotificationCenterDelegate Observer