react-native-moengage 7.4.1 → 8.1.0
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 +72 -1
- package/ReactNativeMoEngage.podspec +3 -3
- package/android/build.gradle +11 -12
- package/android/gradle/wrapper/gradle-wrapper.properties +3 -3
- package/android/gradle.properties +0 -1
- package/android/src/main/java/com/moengage/react/EventEmitterImpl.kt +57 -22
- package/android/src/main/java/com/moengage/react/MoEInitializer.kt +44 -13
- package/android/src/main/java/com/moengage/react/MoEReactBridge.kt +116 -82
- package/android/src/main/java/com/moengage/react/MoEReactHelper.kt +2 -2
- package/android/src/main/java/com/moengage/react/PayloadGenerator.kt +41 -17
- package/iOS/MoEReactBridge/MoEReactBridge.h +1 -1
- package/iOS/MoEReactBridge/MoEReactBridge.m +34 -60
- package/iOS/MoEReactBridge/MoEngageInitializer.h +61 -0
- package/iOS/MoEReactBridge/MoEngageInitializer.m +164 -0
- package/iOS/MoEReactBridge/{MoEReactConstants.h → MoEngageReactConstants.h} +13 -3
- package/iOS/MoEReactBridge/{MoEReactConstants.m → MoEngageReactConstants.m} +14 -7
- package/iOS/MoEReactBridge/MoEngageReactPluginInfo.h +2 -0
- package/iOS/MoEReactBridge.xcodeproj/project.pbxproj +6 -6
- package/package.json +8 -3
- package/src/index.ts +196 -208
- package/src/models/MoEAccountMeta.ts +8 -0
- package/src/models/MoEAction.ts +4 -0
- package/src/models/MoEActionType.ts +4 -0
- package/src/models/MoECampaignContext.ts +10 -0
- package/src/models/MoECampaignData.ts +14 -0
- package/src/models/MoEClickData.ts +18 -0
- package/src/models/MoEGeoLocation.ts +2 -10
- package/src/models/MoEInAppCustomAction.ts +8 -13
- package/src/models/MoEInAppData.ts +16 -0
- package/src/models/MoEInAppNavigation.ts +14 -24
- package/src/models/MoENavigationType.ts +4 -0
- package/src/models/MoEPlatform.ts +4 -0
- package/src/models/MoEProperties.ts +19 -15
- package/src/models/MoEPushCampaign.ts +6 -22
- package/src/models/MoEPushPayload.ts +14 -0
- package/src/models/MoEPushService.ts +4 -4
- package/src/models/MoEPushToken.ts +6 -15
- package/src/models/MoESelfHandledCampaign.ts +10 -0
- package/src/models/MoESelfHandledCampaignData.ts +18 -0
- package/src/models/MoEngagePermissionType.ts +3 -0
- package/src/models/MoEngagePersimissionResultData.ts +14 -0
- package/src/moeParser/MoEInAppParser.ts +192 -0
- package/src/moeParser/MoEPushNotificationParser.ts +78 -0
- package/src/moeParser/MoEngagePayloadParser.ts +11 -0
- package/src/platform/MoERNAndroid.ts +62 -92
- package/src/platform/MoERNiOS.ts +27 -60
- package/src/utils/MoEConstants.ts +61 -0
- package/src/utils/MoEEventHandlerHelper.ts +47 -28
- package/src/utils/MoEJsonBuilder.ts +229 -0
- package/src/utils/MoEObjectToJson.ts +44 -0
- package/iOS/MoEReactBridge/MOReactInitializer.h +0 -46
- package/iOS/MoEReactBridge/MOReactInitializer.m +0 -172
- package/iOS/MoEReactBridge/MOReactPluginInfo.h +0 -2
- package/src/models/MoEInAppCampaign.ts +0 -46
- package/src/models/MoEInAppSelfHandledCampaign.ts +0 -34
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
//
|
|
2
|
+
// MoEngageInitializer.h
|
|
3
|
+
// ReactNativeMoEngage
|
|
4
|
+
//
|
|
5
|
+
// Created by Chengappa C D on 14/02/20.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
#import <UIKit/UIKit.h>
|
|
10
|
+
@import MoEngageSDK;
|
|
11
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
12
|
+
|
|
13
|
+
@interface MoEngageInitializer : NSObject
|
|
14
|
+
|
|
15
|
+
+(instancetype)sharedInstance;
|
|
16
|
+
|
|
17
|
+
/// Initialization Methods to setup SDK with configuration parameters from Info.plist file
|
|
18
|
+
/// @param launchOptions Launch Options dictionary
|
|
19
|
+
/// @warning Make sure to call only one of the initialization methods available (either with plist OR with MOSDKConfig instance)
|
|
20
|
+
/// @version 8.0.0 and above
|
|
21
|
+
- (void)initializeDefaultInstance:(NSDictionary*)launchOptions;
|
|
22
|
+
|
|
23
|
+
/// Initialization Methods to setup SDK with configuration parameters from Info.plist file
|
|
24
|
+
/// @param sdkState MoEngageSDKState enum indicating if SDK is Enabled/Disabled, refer (link)[https://docs.moengage.com/docs/gdpr-compliance-1#enabledisable-sdk] for more info
|
|
25
|
+
/// @param launchOptions Launch Options dictionary
|
|
26
|
+
/// @warning Make sure to call only one of the initialization methods available (either with plist OR with MOSDKConfig instance)
|
|
27
|
+
/// @version 8.1.0 and above
|
|
28
|
+
- (void)initializeDefaultInstanceWithState:(MoEngageSDKState)sdkState andLaunchOptions:(NSDictionary*)launchOptions;
|
|
29
|
+
|
|
30
|
+
/// Initialization Methods to setup SDK with configuration parameters from Info.plist file
|
|
31
|
+
/// @param isSdkEnabled Bool indicating if SDK is Enabled/Disabled, refer (link)[https://docs.moengage.com/docs/gdpr-compliance-1#enabledisable-sdk] for more info
|
|
32
|
+
/// @param launchOptions Launch Options dictionary
|
|
33
|
+
/// @warning Make sure to call only one of the initialization methods available (either with plist OR with MOSDKConfig instance)
|
|
34
|
+
/// @version 8.0.0 and above
|
|
35
|
+
- (void)initializeDefaultInstance:(BOOL)isSdkEnabled andLaunchOptions:(NSDictionary*)launchOptions __deprecated_msg("Use initializeDefaultInstanceWithState:andLaunchOptions instead.");
|
|
36
|
+
|
|
37
|
+
/// Initialization Methods to setup SDK with MOSDKConfig instance instead of from Info.plist file
|
|
38
|
+
/// @param sdkConfig MOSDKConfig instance for SDK configuration
|
|
39
|
+
/// @param launchOptions Launch Options dictionary
|
|
40
|
+
/// @warning Make sure to call only one of the initialization methods available (either with plist OR with MOSDKConfig instance)
|
|
41
|
+
/// @version 8.0.0 and above
|
|
42
|
+
- (void)initializeDefaultSDKConfig:(MOSDKConfig*)sdkConfig andLaunchOptions:(NSDictionary*)launchOptions;
|
|
43
|
+
|
|
44
|
+
/// Initialization Methods to setup SDK with MOSDKConfig instance instead of from Info.plist file
|
|
45
|
+
/// @param sdkConfig MOSDKConfig instance for SDK configuration
|
|
46
|
+
/// @param sdkState MoEngageSDKState indicating if SDK is Enabled/Disabled, refer (link)[https://docs.moengage.com/docs/gdpr-compliance-1#enabledisable-sdk] for more info
|
|
47
|
+
/// @param launchOptions Launch Options dictionary
|
|
48
|
+
/// @warning Make sure to call only one of the initialization methods available (either with plist OR with MOSDKConfig instance)
|
|
49
|
+
/// @version 8.1.0 and above
|
|
50
|
+
- (void)initializeDefaultSDKConfigWithState:(MOSDKConfig*)sdkConfig withSDKState:(MoEngageSDKState)sdkState andLaunchOptions:(NSDictionary*)launchOptions;
|
|
51
|
+
|
|
52
|
+
/// Initialization Methods to setup SDK with MOSDKConfig instance instead of from Info.plist file
|
|
53
|
+
/// @param sdkConfig MOSDKConfig instance for SDK configuration
|
|
54
|
+
/// @param isSdkEnabled Bool indicating if SDK is Enabled/Disabled, refer (link)[https://docs.moengage.com/docs/gdpr-compliance-1#enabledisable-sdk] for more info
|
|
55
|
+
/// @param launchOptions Launch Options dictionary
|
|
56
|
+
/// @warning Make sure to call only one of the initialization methods available (either with plist OR with MOSDKConfig instance)
|
|
57
|
+
/// @version 8.0.0 and above
|
|
58
|
+
- (void)initializeDefaultSDKConfig:(MOSDKConfig*)sdkConfig withSDKState:(BOOL)isSdkEnabled andLaunchOptions:(NSDictionary*)launchOptions __deprecated_msg("Use initializeDefaultSDKConfigWithState:andLaunchOptions instead.");
|
|
59
|
+
@end
|
|
60
|
+
|
|
61
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
//
|
|
2
|
+
// MoEngageReact.m
|
|
3
|
+
// ReactNativeMoEngage
|
|
4
|
+
//
|
|
5
|
+
// Created by Chengappa C D on 14/02/20.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import "MoEngageInitializer.h"
|
|
9
|
+
#import "MoEngageReactPluginInfo.h"
|
|
10
|
+
#import "MoEngageReactConstants.h"
|
|
11
|
+
#import "MoEReactBridge.h"
|
|
12
|
+
@import MoEngageSDK;
|
|
13
|
+
@import MoEngagePluginBase;
|
|
14
|
+
@import MoEngageObjCUtils;
|
|
15
|
+
|
|
16
|
+
@interface MoEngageInitializer() <MoEngagePluginBridgeDelegate>
|
|
17
|
+
|
|
18
|
+
@end
|
|
19
|
+
|
|
20
|
+
@implementation MoEngageInitializer
|
|
21
|
+
|
|
22
|
+
#pragma mark- Initialization
|
|
23
|
+
|
|
24
|
+
+(instancetype)sharedInstance{
|
|
25
|
+
static dispatch_once_t onceToken;
|
|
26
|
+
static MoEngageInitializer *instance;
|
|
27
|
+
dispatch_once(&onceToken, ^{
|
|
28
|
+
instance = [[MoEngageInitializer alloc] init];
|
|
29
|
+
});
|
|
30
|
+
return instance;
|
|
31
|
+
}
|
|
32
|
+
#pragma mark- Initialization methods
|
|
33
|
+
|
|
34
|
+
- (void)initializeDefaultInstance:(NSDictionary*)launchOptions{
|
|
35
|
+
[self initializeDefaultSDKConfig:[self fetchSDKConfig] andLaunchOptions:launchOptions];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
- (void)initializeDefaultSDKConfig:(MOSDKConfig*)sdkConfig andLaunchOptions:(NSDictionary*)launchOptions{
|
|
39
|
+
MoEngagePlugin *plugin = [[MoEngagePlugin alloc] init];
|
|
40
|
+
[plugin initializeDefaultInstanceWithSdkConfig:sdkConfig launchOptions:launchOptions];
|
|
41
|
+
[self commonSetUp:plugin identifier:sdkConfig.identifier];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
- (void)initializeDefaultInstance:(BOOL)isSdkEnabled andLaunchOptions:(NSDictionary*)launchOptions{
|
|
45
|
+
MOSDKConfig *sdkConfig = [self fetchSDKConfig];
|
|
46
|
+
MoEngageSDKState currentSDKState = isSdkEnabled ? MoEngageSDKStateEnabled: MoEngageSDKStateDisabled;
|
|
47
|
+
[self initializeDefaultSDKConfigWithState:sdkConfig withSDKState:currentSDKState andLaunchOptions:launchOptions];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
- (void)initializeDefaultInstanceWithState:(MoEngageSDKState)sdkState andLaunchOptions:(NSDictionary*)launchOptions{
|
|
51
|
+
MOSDKConfig *sdkConfig = [self fetchSDKConfig];
|
|
52
|
+
[self initializeDefaultSDKConfigWithState:sdkConfig withSDKState:sdkState andLaunchOptions:launchOptions];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
- (void)initializeDefaultSDKConfig:(MOSDKConfig*)sdkConfig withSDKState:(BOOL)isSDKEnabled andLaunchOptions:(NSDictionary*)launchOptions{
|
|
56
|
+
MoEngageSDKState currentSDKState = isSDKEnabled ? MoEngageSDKStateEnabled: MoEngageSDKStateDisabled;
|
|
57
|
+
[self initializeDefaultSDKConfigWithState:sdkConfig withSDKState:currentSDKState andLaunchOptions:launchOptions];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
- (void)initializeDefaultSDKConfigWithState:(MOSDKConfig*)sdkConfig withSDKState:(MoEngageSDKState)sdkState andLaunchOptions:(NSDictionary*)launchOptions{
|
|
61
|
+
|
|
62
|
+
MoEngagePlugin *plugin = [[MoEngagePlugin alloc] init];
|
|
63
|
+
[plugin initializeDefaultInstanceWithSdkConfig:sdkConfig sdkState:sdkState launchOptions:launchOptions];
|
|
64
|
+
[self commonSetUp: plugin identifier:sdkConfig.identifier];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
#pragma mark- Utils
|
|
68
|
+
|
|
69
|
+
- (void)commonSetUp:(MoEngagePlugin *)plugin identifier:(NSString*)identifier {
|
|
70
|
+
[plugin trackPluginInfo: kReactNative version:MOE_REACT_PLUGIN_VERSION];
|
|
71
|
+
[self setPluginBridgeDelegate:identifier];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
- (void)setPluginBridgeDelegate: (NSString*)identifier {
|
|
75
|
+
[[MoEngagePluginBridge sharedInstance] setPluginBridgeDelegate:self identifier:identifier];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
-(MOSDKConfig*)fetchSDKConfig {
|
|
79
|
+
NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary];
|
|
80
|
+
MOSDKConfig *sdkConfig;
|
|
81
|
+
|
|
82
|
+
if ( [infoDict objectForKey: kMoEngage] != nil && [infoDict objectForKey: kMoEngage] != [NSNull null]) {
|
|
83
|
+
NSDictionary* moeDict = [infoDict objectForKey: kMoEngage];
|
|
84
|
+
if ([moeDict objectForKey: kAppId] != nil && [moeDict objectForKey:kAppId] != [NSNull null]) {
|
|
85
|
+
|
|
86
|
+
NSString *appId = [moeDict objectForKey: kAppId];
|
|
87
|
+
if (appId.length > 0) {
|
|
88
|
+
sdkConfig = [[MOSDKConfig alloc] initWithAppID:appId];
|
|
89
|
+
}
|
|
90
|
+
} else {
|
|
91
|
+
NSAssert(NO, @"MoEngage - Configure the APP ID for your MoEngage App.To get the AppID login to your MoEngage account, after that go to Settings -> App Settings. You will find the App ID in this screen. And refer to docs.moengage.com for more info");
|
|
92
|
+
return nil;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if ([moeDict objectForKey: kDataCenter] != nil && [moeDict objectForKey:kDataCenter] != [NSNull null]) {
|
|
96
|
+
sdkConfig.moeDataCenter = [self getDataCenterFromString: [moeDict objectForKey: kDataCenter]];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if ([moeDict objectForKey:kAppGroupId] != nil && [moeDict objectForKey:kAppGroupId] != [NSNull null]) {
|
|
100
|
+
sdkConfig.appGroupID = [moeDict objectForKey:kAppGroupId];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if ([moeDict objectForKey:kDisablePeriodicFlush] != nil && [moeDict objectForKey:kDisablePeriodicFlush] != [NSNull null]) {
|
|
104
|
+
sdkConfig.analyticsDisablePeriodicFlush = [moeDict getBooleanForKey:kDisablePeriodicFlush];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if ([moeDict objectForKey:kPeriodicFlushDuration] != nil && [moeDict objectForKey:kPeriodicFlushDuration] != [NSNull null]) {
|
|
108
|
+
sdkConfig.analyticsPeriodicFlushDuration = [moeDict getIntegerForKey:kPeriodicFlushDuration];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if ([moeDict objectForKey:kEncryptNetworkRequests] != nil && [moeDict objectForKey:kEncryptNetworkRequests] != [NSNull null]) {
|
|
112
|
+
sdkConfig.encryptNetworkRequests = [moeDict getBooleanForKey:kDisablePeriodicFlush];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if ([moeDict objectForKey:kEnableLogs] != nil && [moeDict objectForKey:kEnableLogs] != [NSNull null]) {
|
|
116
|
+
sdkConfig.enableLogs = [moeDict getBooleanForKey:kEnableLogs];
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return sdkConfig;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
- (MODataCenter)getDataCenterFromString:(NSString*)stringVal {
|
|
124
|
+
MODataCenter dataCenter = MODataCenterData_center_01;
|
|
125
|
+
|
|
126
|
+
if ([stringVal isEqual:kDataCenter1])
|
|
127
|
+
{
|
|
128
|
+
dataCenter = MODataCenterData_center_01;
|
|
129
|
+
}
|
|
130
|
+
else if ([stringVal isEqual:kDataCenter2])
|
|
131
|
+
{
|
|
132
|
+
dataCenter = MODataCenterData_center_02;
|
|
133
|
+
}
|
|
134
|
+
else if ([stringVal isEqual:kDataCenter3])
|
|
135
|
+
{
|
|
136
|
+
dataCenter = MODataCenterData_center_03;
|
|
137
|
+
}
|
|
138
|
+
else
|
|
139
|
+
{
|
|
140
|
+
NSLog(@"%@", kInvalidDataCenterAlert);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return dataCenter;
|
|
144
|
+
}
|
|
145
|
+
#pragma mark- MoEPluginBridgeDelegate
|
|
146
|
+
- (void)sendMessageWithEvent:(NSString *)event message:(NSDictionary<NSString *,id> *)message {
|
|
147
|
+
NSMutableDictionary* updatedDict = [NSMutableDictionary dictionary];
|
|
148
|
+
|
|
149
|
+
if (message) {
|
|
150
|
+
NSError *err;
|
|
151
|
+
NSData * jsonData = [NSJSONSerialization dataWithJSONObject:message options:0 error:&err];
|
|
152
|
+
if (jsonData) {
|
|
153
|
+
NSString* strPayload = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
|
|
154
|
+
updatedDict[kPayload] = strPayload;
|
|
155
|
+
} else {
|
|
156
|
+
NSLog(@"Error converting to dictionary to string %@", err.localizedDescription);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
NSDictionary* userInfo = @{kEventName:event,kPayloadDict:updatedDict};
|
|
161
|
+
MoEReactBridge *reactBridge = [MoEReactBridge allocWithZone: nil];
|
|
162
|
+
[reactBridge sendEventWithName:userInfo];
|
|
163
|
+
}
|
|
164
|
+
@end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
2
|
+
// MoEngageReactConstants.h
|
|
3
3
|
// ReactNativeMoEngage
|
|
4
4
|
//
|
|
5
5
|
// Created by Rakshitha C D on 10/02/21.
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
#import <Foundation/Foundation.h>
|
|
10
10
|
|
|
11
|
+
extern NSString* const kReactNative;
|
|
12
|
+
|
|
11
13
|
//Info.plist keys
|
|
12
14
|
extern NSString* const kMoEngage;
|
|
13
15
|
extern NSString* const kAppId;
|
|
@@ -17,10 +19,9 @@ extern NSString* const kDisablePeriodicFlush;
|
|
|
17
19
|
extern NSString* const kPeriodicFlushDuration;
|
|
18
20
|
extern NSString* const kEncryptNetworkRequests;
|
|
19
21
|
extern NSString* const kOptOutDataTracking;
|
|
20
|
-
extern NSString* const kOptOutPushNotifications;
|
|
21
|
-
extern NSString* const kOptOutInApp;
|
|
22
22
|
extern NSString* const kOptOutIDFATracking;
|
|
23
23
|
extern NSString* const kOptOutIDFVTracking;
|
|
24
|
+
extern NSString* const kEnableLogs;
|
|
24
25
|
|
|
25
26
|
//DataCenter Constants
|
|
26
27
|
extern NSString* const kDataCenter1;
|
|
@@ -35,3 +36,12 @@ extern NSString* const kEventEmitted;
|
|
|
35
36
|
|
|
36
37
|
extern NSString* const kInvalidAppIdAlert;
|
|
37
38
|
extern NSString* const kInvalidDataCenterAlert;
|
|
39
|
+
|
|
40
|
+
extern NSString* const kInAppShown;
|
|
41
|
+
extern NSString* const kInAppDismissed;
|
|
42
|
+
extern NSString* const kInAppClicked;
|
|
43
|
+
extern NSString* const kInAppCustomAction;
|
|
44
|
+
extern NSString* const kInAppSelfHandled;
|
|
45
|
+
extern NSString* const kPushTokenGenerated;
|
|
46
|
+
extern NSString* const kPushClicked;
|
|
47
|
+
extern NSString* const kPermissionResult;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
2
|
+
// MoEngageReactConstants.m
|
|
3
3
|
// ReactNativeMoEngage
|
|
4
4
|
//
|
|
5
5
|
// Created by Rakshitha C D on 10/02/21.
|
|
6
6
|
// Copyright © 2020 MoEngage. All rights reserved.
|
|
7
7
|
//
|
|
8
8
|
|
|
9
|
-
#import "
|
|
9
|
+
#import "MoEngageReactConstants.h"
|
|
10
|
+
|
|
11
|
+
NSString* const kReactNative = @"react_native";
|
|
10
12
|
|
|
11
13
|
// Info.plist Keys
|
|
12
14
|
NSString* const kMoEngage = @"MoEngage";
|
|
@@ -16,11 +18,7 @@ NSString* const kAppGroupId = @"APP_GROUP_ID";
|
|
|
16
18
|
NSString* const kDisablePeriodicFlush = @"DISABLE_PERIODIC_FLUSH";
|
|
17
19
|
NSString* const kPeriodicFlushDuration = @"PERIODIC_FLUSH_DURATION";
|
|
18
20
|
NSString* const kEncryptNetworkRequests = @"ENCRYPT_NETWORK_REQUESTS";
|
|
19
|
-
NSString* const
|
|
20
|
-
NSString* const kOptOutPushNotifications = @"OPT_OUT_PUSH_NOTIFICATIONS";
|
|
21
|
-
NSString* const kOptOutInApp = @"OPT_OUT_INAPP";
|
|
22
|
-
NSString* const kOptOutIDFATracking = @"OPT_OUT_IDFA_TRACKING";
|
|
23
|
-
NSString* const kOptOutIDFVTracking = @"OPT_OUT_IDFV_TRACKING";
|
|
21
|
+
NSString* const kEnableLogs = @"ENABLE_LOGS";
|
|
24
22
|
|
|
25
23
|
//DataCenter Constants
|
|
26
24
|
NSString* const kDataCenter1 = @"DATA_CENTER_01";
|
|
@@ -35,3 +33,12 @@ NSString* const kEventEmitted = @"event-emitted";
|
|
|
35
33
|
|
|
36
34
|
NSString* const kInvalidAppIdAlert = @"MoEngage - Provide the APP ID for your MoEngage App in Info.plist for key MoEngage_APP_ID to proceed. To get the AppID login to your MoEngage account, after that go to Settings -> App Settings. You will find the App ID in this screen.";
|
|
37
35
|
NSString* const kInvalidDataCenterAlert = @"MoEngage - Invalid DataCenter";
|
|
36
|
+
|
|
37
|
+
NSString* const kInAppShown = @"MoEInAppCampaignShown";
|
|
38
|
+
NSString* const kInAppDismissed = @"MoEInAppCampaignDismissed";
|
|
39
|
+
NSString* const kInAppClicked = @"MoEInAppCampaignClicked";
|
|
40
|
+
NSString* const kInAppCustomAction = @"MoEInAppCampaignCustomAction";
|
|
41
|
+
NSString* const kInAppSelfHandled = @"MoEInAppCampaignSelfHandled";
|
|
42
|
+
NSString* const kPushTokenGenerated = @"MoEPushTokenGenerated";
|
|
43
|
+
NSString* const kPushClicked = @"MoEPushClicked";
|
|
44
|
+
NSString* const kPermissionResult = @"MoEPermissionResult";
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
|
+
ACD518BE28ACAD510014B432 /* MoEReactInitializer.m in Sources */ = {isa = PBXBuildFile; fileRef = ACD518BC28ACAD510014B432 /* MoEReactInitializer.m */; };
|
|
10
11
|
ACFA62C125D3C4C4003F68AC /* MoEReactConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = ACFA62C025D3C4C4003F68AC /* MoEReactConstants.m */; };
|
|
11
|
-
AF5962E923F6CEDB001C36F3 /* MOReactInitializer.m in Sources */ = {isa = PBXBuildFile; fileRef = AF5962E523F6CEDB001C36F3 /* MOReactInitializer.m */; };
|
|
12
12
|
AFF22D141DE315A7003DEB74 /* MoEReactBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = AFF22D0F1DE315A7003DEB74 /* MoEReactBridge.m */; };
|
|
13
13
|
/* End PBXBuildFile section */
|
|
14
14
|
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
/* End PBXCopyFilesBuildPhase section */
|
|
26
26
|
|
|
27
27
|
/* Begin PBXFileReference section */
|
|
28
|
+
ACD518BC28ACAD510014B432 /* MoEReactInitializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoEReactInitializer.m; sourceTree = "<group>"; };
|
|
29
|
+
ACD518BD28ACAD510014B432 /* MoEReactInitializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoEReactInitializer.h; sourceTree = "<group>"; };
|
|
28
30
|
ACFA62BD25D3C44F003F68AC /* MoEReactConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MoEReactConstants.h; sourceTree = "<group>"; };
|
|
29
31
|
ACFA62C025D3C4C4003F68AC /* MoEReactConstants.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MoEReactConstants.m; sourceTree = "<group>"; };
|
|
30
|
-
AF5962DF23F6CEDB001C36F3 /* MOReactInitializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOReactInitializer.h; sourceTree = "<group>"; };
|
|
31
32
|
AF5962E423F6CEDB001C36F3 /* MOReactPluginInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOReactPluginInfo.h; sourceTree = "<group>"; };
|
|
32
|
-
AF5962E523F6CEDB001C36F3 /* MOReactInitializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOReactInitializer.m; sourceTree = "<group>"; };
|
|
33
33
|
AFB2ED6A1DEC59830054BDA0 /* libMoEngage-iOS-SDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libMoEngage-iOS-SDK.a"; path = "/Users/Chengappa/Documents/Office/ReactNative/AwesomeProject/ios/Pods/../build/Debug-iphoneos/MoEngage-iOS-SDK/libMoEngage-iOS-SDK.a"; sourceTree = "<absolute>"; };
|
|
34
34
|
AFEF01DC1DD5D1D90017905F /* libMoEReactBridge.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMoEReactBridge.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
35
35
|
AFF22D0E1DE315A7003DEB74 /* MoEReactBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoEReactBridge.h; sourceTree = "<group>"; };
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
AF5962E423F6CEDB001C36F3 /* MOReactPluginInfo.h */,
|
|
72
72
|
AFF22D0E1DE315A7003DEB74 /* MoEReactBridge.h */,
|
|
73
73
|
AFF22D0F1DE315A7003DEB74 /* MoEReactBridge.m */,
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
ACD518BD28ACAD510014B432 /* MoEReactInitializer.h */,
|
|
75
|
+
ACD518BC28ACAD510014B432 /* MoEReactInitializer.m */,
|
|
76
76
|
ACFA62BD25D3C44F003F68AC /* MoEReactConstants.h */,
|
|
77
77
|
ACFA62C025D3C4C4003F68AC /* MoEReactConstants.m */,
|
|
78
78
|
);
|
|
@@ -148,8 +148,8 @@
|
|
|
148
148
|
buildActionMask = 2147483647;
|
|
149
149
|
files = (
|
|
150
150
|
ACFA62C125D3C4C4003F68AC /* MoEReactConstants.m in Sources */,
|
|
151
|
+
ACD518BE28ACAD510014B432 /* MoEReactInitializer.m in Sources */,
|
|
151
152
|
AFF22D141DE315A7003DEB74 /* MoEReactBridge.m in Sources */,
|
|
152
|
-
AF5962E923F6CEDB001C36F3 /* MOReactInitializer.m in Sources */,
|
|
153
153
|
);
|
|
154
154
|
runOnlyForDeploymentPostprocessing = 0;
|
|
155
155
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-moengage",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.1.0",
|
|
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
|
"keywords": [
|
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
17
17
|
},
|
|
18
18
|
"author": "MoEngage",
|
|
19
|
-
"contributors": [
|
|
20
|
-
|
|
19
|
+
"contributors": [
|
|
20
|
+
"MoEngage <mobiledevs@moengage.com>"
|
|
21
|
+
],
|
|
22
|
+
"license": "ISC",
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/react-native": "^0.69.3"
|
|
25
|
+
}
|
|
21
26
|
}
|