...
CocoaPods (needed for iOS)
Mapp React Native plugin 1.1.0-beta01:
Required React and ReactNative versions
Code Block | ||
---|---|---|
| ||
"react": "18.12.0" "react-native": "0.7173.24" |
Installation
Use command
npm install https://github.com/MappCloud/React-native-plugin.git --save
or
npm install react-native-mapp-plugin --save
...
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];
} |