Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • iOS: Mapp plugin n support iOS10 and above

  • Android: Mapp plugin support for Android 19Android 21 (KitKatLollipop) and above


Prerequisites

  • Node and Yarn installed on your mac.

  • CocoaPods (needed for iOS)

  • Mapp React Native plugin 1.0.2

 

Required React and ReactNative versions

Code Block
languagejson
"react": "18.2.0"
"react-native": "0.73.4"

Installation 

  • Use command npm install https://github.com/MappCloud/React-native-plugin.git --save

  • or npm install react-native-mapp-plugin --save

Integration

  • Download plugin locally.

  • Add it as dependency to your package.json

  • yarn install or npm

Android Manually integration for the old versions

  1. Open up `android/app/src/main/java/[...]/MainActivity.java`

  • Add `import com.reactlibrary.RNMappPluginPackage;` to the imports at the top of the file

  • Add `new RNMappPluginPackage()` to the list returned by the `getPackages()` method

...

Rich Push Notifications Integration for iOS

5)In order to execute action from buttons or message body the following code needs to be added at AppDelegate file:

Code Block
#import <RNMappPlugin/RNMappEventEmmiter.h>

// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries

(

void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler

{

  [[Appoxee shared] didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler andNotifyCompletionWithBlock:^(NSError * _Nullable appoxeeError, id  _Nullable data) {

    

  }];

  return [super application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];

}