Flutter Integration to Mapp Cloud

Acknowledgments 

  • iOS: Mapp plugin supports iOS10 and above

  • Android: Mapp plugin supports for Android 21 (Lollipop) and above


Prerequisites

Installation 

Before you run this command please check flutter with command flutter doctor , if your XCode doesn’t set correctly the podfile at iOS folder will not be automatically created for you.

  • Use command flutter pub add mapp_sdk

 

Android Setup:

apply plugin: 'com.google.gms.google-services'
  • Set in build.gradle file targetSdkVersion:

targetSdkVersion 33

Minimum supported SDK version is 21.

minSdkVersion 21

 

iOS

  1. Open podfile, uncomment # platform :ios, '9.0' line and increase iOS to 10.0. Search for line with use_frameworks! and comment it by adding #

  2. Install pods

cd example/ios && pod install

this should install automatically pod
if you are using M1 mac for development you would probably need to run
cd example/ios && pod install --repo-update
if it still doesn’t work try adding arch -x86_64 before pod install

  1. Add the following capabilities for your application target:

  • Push Notification

  • Background Modes > Remote Notifications

  • Background Modes > Location updates (if you want to use geotargeting)

 

  1. Create a plist `AppoxeeConfig.plist` and include it in your application’s target (this file must be present at Build Phases → Copy Bundle Resources):

 Rich push

iOS

  1. If using Rich notifications follow instructions from this page:

Rich Push Notifications Integration for iOS

Android

In launcher activity of client aplication override methods onCrete and onNewIntent on following way:

 

In ApplicationManifest.xml declare launchMode for MainActivity as singleTop. This is mandatory to provide proper handling of a rich push messages in all application states (quit, background, foreground).

 

Geotargeting (Geofencing)

Android

Change MainActivity to extend FlutterFragmentActivity.

 

Add locations and internet permissions in the AndroidManifest.xml file

Note: Geofencing is not available in initial plugin release. It’s available from version 0.0.5.