react-native-moengage 11.1.0 → 11.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/ReactNativeMoEngage.podspec +1 -1
- package/android/build.gradle +2 -2
- package/iOS/MoEReactBridge/MoEReactBridge.h +3 -8
- package/iOS/MoEReactBridge/MoEReactBridge.mm +6 -1
- package/iOS/MoEReactBridge/MoEReactEventDispatcher.h +14 -0
- package/iOS/MoEReactBridge/MoEReactNativeHandler.h +4 -3
- package/iOS/MoEReactBridge/MoEReactNativeHandler.m +2 -2
- package/iOS/MoEReactBridge/MoEngageInitializer.m +1 -1
- package/package.json +1 -1
- package/src/models/MoEInAppRules.ts +2 -2
- package/src/moeParser/MoEInAppParser.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# 08-01-2025
|
|
2
|
+
|
|
3
|
+
## 11.1.2
|
|
4
|
+
- Added support for React version 0.76.
|
|
5
|
+
|
|
6
|
+
# 25-11-2024
|
|
7
|
+
|
|
8
|
+
## 11.1.1
|
|
9
|
+
- Fixing the lint issue for `getMoEInAppRules` with `noImplicitAny` as false in tsconfig file
|
|
10
|
+
- Android
|
|
11
|
+
- `moe-android-sdk` version updated to `13.05.01`
|
|
12
|
+
- `inapp` version updated to `8.7.0`
|
|
13
|
+
- iOS
|
|
14
|
+
- Fixed the compiler issue in Apple TV.
|
|
15
|
+
|
|
1
16
|
# 30-09-2024
|
|
2
17
|
|
|
3
18
|
## 11.1.0
|
|
@@ -15,7 +15,7 @@ Pod::Spec.new do |s|
|
|
|
15
15
|
s.platforms = { :ios => "11.0", :tvos => "11.0" }
|
|
16
16
|
s.source_files = 'iOS/MoEReactBridge/**/*.{h,m,mm}'
|
|
17
17
|
s.dependency 'React'
|
|
18
|
-
s.dependency 'MoEngagePluginBase','5.1.
|
|
18
|
+
s.dependency 'MoEngagePluginBase','5.1.1'
|
|
19
19
|
s.ios.dependency 'MoEngage-iOS-SDK/RichNotification'
|
|
20
20
|
|
|
21
21
|
s.prepare_command = <<-CMD
|
package/android/build.gradle
CHANGED
|
@@ -20,8 +20,8 @@ rootProject.allprojects {
|
|
|
20
20
|
|
|
21
21
|
ext {
|
|
22
22
|
//dependency version
|
|
23
|
-
moengageCoreVersion = "13.05.
|
|
24
|
-
moengageInAppVersion = "8.
|
|
23
|
+
moengageCoreVersion = "13.05.01"
|
|
24
|
+
moengageInAppVersion = "8.7.0"
|
|
25
25
|
basePluginVersion = "4.2.0"
|
|
26
26
|
//build versions
|
|
27
27
|
minimumVersion = 21
|
|
@@ -9,18 +9,13 @@
|
|
|
9
9
|
#import <Foundation/Foundation.h>
|
|
10
10
|
#import <React/RCTBridgeModule.h>
|
|
11
11
|
#import <React/RCTEventEmitter.h>
|
|
12
|
+
#import "MoEReactEventDispatcher.h"
|
|
12
13
|
|
|
13
14
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
14
15
|
#import <NativeMoEngageSpec/NativeMoEngageSpec.h>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
18
|
-
@interface MoEReactBridge : RCTEventEmitter <NativeMoEngageSpec>
|
|
19
|
-
-(void)sendEventWithName:(NSDictionary *)payloadDict;
|
|
16
|
+
@interface MoEReactBridge : RCTEventEmitter <NativeMoEngageSpec, MoEReactEventDispatcher>
|
|
20
17
|
@end
|
|
21
18
|
#else
|
|
22
|
-
@interface MoEReactBridge : RCTEventEmitter <RCTBridgeModule>
|
|
23
|
-
-(void)sendEventWithName:(NSDictionary *)payloadDict;
|
|
19
|
+
@interface MoEReactBridge : RCTEventEmitter <RCTBridgeModule, MoEReactEventDispatcher>
|
|
24
20
|
@end
|
|
25
21
|
#endif
|
|
26
|
-
|
|
@@ -44,7 +44,7 @@ RCT_EXPORT_MODULE(MoEReactBridge);
|
|
|
44
44
|
-(void)startObserving {
|
|
45
45
|
hasListeners = YES;
|
|
46
46
|
[self flushDelayedEvents];
|
|
47
|
-
[MoEReactNativeHandler sharedInstance].
|
|
47
|
+
[MoEReactNativeHandler sharedInstance].delegate = self;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
// Will be called when this module's last listener is removed, or on dealloc.
|
|
@@ -244,6 +244,11 @@ RCT_EXPORT_METHOD(deleteUser:(NSString *)payload resolve:(RCTPromiseResolveBlock
|
|
|
244
244
|
RCTLogInfo(@"Warning: This is an Android only feature.");
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
+
RCT_EXPORT_METHOD(deviceIdentifierTrackingStatusUpdate:(NSString *)payload) {
|
|
248
|
+
RCTLogInfo(@"Warning: This is an Android only feature.");
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
|
|
247
252
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
248
253
|
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const facebook::react::ObjCTurboModule::InitParams &)params {
|
|
249
254
|
return std::make_shared<facebook::react::NativeMoEngageSpecJSI>(params);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//
|
|
2
|
+
// MoEReactEventDispatcher.h
|
|
3
|
+
// ReactNativeMoEngage
|
|
4
|
+
//
|
|
5
|
+
// Created by Rakshitha . on 03/01/25.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
@protocol MoEReactEventDispatcher <NSObject>
|
|
11
|
+
|
|
12
|
+
-(void)sendEventWithName:(NSDictionary *)payloadDict;
|
|
13
|
+
|
|
14
|
+
@end
|
|
@@ -9,14 +9,15 @@
|
|
|
9
9
|
#import <Foundation/Foundation.h>
|
|
10
10
|
#import <UIKit/UIKit.h>
|
|
11
11
|
#import <React/RCTEventEmitter.h>
|
|
12
|
-
#import "
|
|
12
|
+
#import "MoEReactEventDispatcher.h"
|
|
13
|
+
|
|
13
14
|
|
|
14
15
|
@interface MoEReactNativeHandler : NSObject
|
|
15
16
|
+(instancetype)sharedInstance;
|
|
16
17
|
|
|
17
|
-
@property (nonatomic, weak)
|
|
18
|
+
@property (nonatomic, weak) id<MoEReactEventDispatcher> delegate;
|
|
18
19
|
|
|
19
|
-
-(void)
|
|
20
|
+
-(void)setPluginBridgeDelegate:(NSString *)identifier;
|
|
20
21
|
|
|
21
22
|
-(void)initialize:(NSString *)payload;
|
|
22
23
|
-(void)setAppStatus:(NSString *)payload;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
return instance;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
-(void)
|
|
29
|
+
-(void)setPluginBridgeDelegate:(NSString *)identifier {
|
|
30
30
|
[[MoEngagePluginBridge sharedInstance] setPluginBridgeDelegate:self identifier:identifier];
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
NSDictionary* userInfo = @{kEventName:event,kPayloadDict:updatedDict};
|
|
157
|
-
[self.
|
|
157
|
+
[self.delegate sendEventWithName:userInfo];
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
@end
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-moengage",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.2",
|
|
4
4
|
"description": "MoEngage is a mobile marketing automation company. This react-native SDK helps you track events, trigger smart notifications and in-apps, provides a drop-in Inbox Controller for notifications.",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* DisplayRules for Campaign
|
|
3
|
-
* @since
|
|
3
|
+
* @since 11.1.0
|
|
4
4
|
*/
|
|
5
5
|
export default class MoEInAppRules {
|
|
6
6
|
/**
|
|
@@ -13,7 +13,7 @@ export default class MoEInAppRules {
|
|
|
13
13
|
*/
|
|
14
14
|
contexts: Array<string>
|
|
15
15
|
|
|
16
|
-
constructor(screenName: string, contexts: Array<string> = []) {
|
|
16
|
+
constructor(screenName: string | null, contexts: Array<string> = []) {
|
|
17
17
|
this.screenName = screenName;
|
|
18
18
|
this.contexts = contexts;
|
|
19
19
|
}
|
|
@@ -79,7 +79,7 @@ function getMoESelfHandledCampaign(json: { [k: string]: any }) {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
function getMoEInAppRules(json: { [k: string]: any }) {
|
|
82
|
-
var screenName = null;
|
|
82
|
+
var screenName: string | null = null;
|
|
83
83
|
if (json[MOE_INAPP_SCREEN_NAME] != undefined) {
|
|
84
84
|
screenName = json[MOE_INAPP_SCREEN_NAME];
|
|
85
85
|
}
|