react-native-moengage 8.1.1 → 8.2.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 CHANGED
@@ -1,3 +1,22 @@
1
+ # 16-01-2023
2
+
3
+ ## 8.2.0
4
+ - iOS
5
+ - MoEngage-iOS-SDK version updated to `~>9.2.0`.
6
+ - Updated API
7
+
8
+ | Then | Now |
9
+ |:----------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------:|
10
+ | - (void)initializeDefaultSDKConfig:(MOSDKConfig*)sdkConfig andLaunchOptions:(NSDictionary*)launchOptions; | -(void)initializeDefaultSDKConfig:(MoEngageSDKConfig*)sdkConfig andLaunchOptions:(NSDictionary*)launchOptions; |
11
+ | - (void)initializeDefaultSDKConfigWithState:(MOSDKConfig*)sdkConfig withSDKState:(MoEngageSDKState)sdkState andLaunchOptions:(NSDictionary*)launchOptions; | - (void)initializeDefaultSDKConfigWithState:(MoEngageSDKConfig*)sdkConfig withSDKState:(MoEngageSDKState)sdkState andLaunchOptions:(NSDictionary*)launchOptions; |
12
+
13
+ # 21-11-2022
14
+
15
+ ## 8.1.2
16
+ - iOS
17
+ - BugFix
18
+ - Updated the import statement to make the plugin compatible with C++ codebase.
19
+
1
20
  # 09-11-2022
2
21
 
3
22
  ## 8.1.1
@@ -15,8 +15,8 @@ Pod::Spec.new do |s|
15
15
  s.platform = :ios, "10.0"
16
16
  s.source_files = 'iOS/MoEReactBridge/**/*.{h,m}'
17
17
  s.dependency 'React'
18
- s.dependency 'MoEngagePluginBase','>= 3.1.0','< 3.2.0'
19
- s.dependency 'MoEngageRichNotification','>= 6.4.0','< 6.5.0'
18
+ s.dependency 'MoEngagePluginBase','>= 4.0.0','< 4.1.0'
19
+ s.dependency 'MoEngageRichNotification','>= 7.2.0','< 7.3.0'
20
20
 
21
21
  s.prepare_command = <<-CMD
22
22
  echo // Generated file, do not edit > iOS/MoEReactBridge/MoEngageReactPluginInfo.h
@@ -12,9 +12,8 @@
12
12
  #import <React/RCTBundleURLProvider.h>
13
13
  #import "MoEngageInitializer.h"
14
14
  #import "MoEngageReactConstants.h"
15
+ #import <MoEngageSDK/MoEngageSDK.h>
15
16
  @import MoEngagePluginBase;
16
- @import MoEngageSDK;
17
-
18
17
  @interface MoEReactBridge()
19
18
  @end
20
19
 
@@ -7,7 +7,10 @@
7
7
 
8
8
  #import <Foundation/Foundation.h>
9
9
  #import <UIKit/UIKit.h>
10
- @import MoEngageSDK;
10
+
11
+ @protocol SFSafariViewControllerDelegate;
12
+ #import <MoEngageSDK/MoEngageSDK.h>
13
+
11
14
  NS_ASSUME_NONNULL_BEGIN
12
15
 
13
16
  @interface MoEngageInitializer : NSObject
@@ -16,14 +19,14 @@ NS_ASSUME_NONNULL_BEGIN
16
19
 
17
20
  /// Initialization Methods to setup SDK with configuration parameters from Info.plist file
18
21
  /// @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)
22
+ /// @warning Make sure to call only one of the initialization methods available (either with plist OR with MoEngageSDKConfig instance)
20
23
  /// @version 8.0.0 and above
21
24
  - (void)initializeDefaultInstance:(NSDictionary*)launchOptions;
22
25
 
23
26
  /// Initialization Methods to setup SDK with configuration parameters from Info.plist file
24
27
  /// @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
28
  /// @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)
29
+ /// @warning Make sure to call only one of the initialization methods available (either with plist OR with MoEngageSDKConfig instance)
27
30
  /// @version 8.1.0 and above
28
31
  - (void)initializeDefaultInstanceWithState:(MoEngageSDKState)sdkState andLaunchOptions:(NSDictionary*)launchOptions;
29
32
 
@@ -34,28 +37,28 @@ NS_ASSUME_NONNULL_BEGIN
34
37
  /// @version 8.0.0 and above
35
38
  - (void)initializeDefaultInstance:(BOOL)isSdkEnabled andLaunchOptions:(NSDictionary*)launchOptions __deprecated_msg("Use initializeDefaultInstanceWithState:andLaunchOptions instead.");
36
39
 
37
- /// Initialization Methods to setup SDK with MOSDKConfig instance instead of from Info.plist file
38
- /// @param sdkConfig MOSDKConfig instance for SDK configuration
40
+ /// Initialization Methods to setup SDK with MoEngageSDKConfig instance instead of from Info.plist file
41
+ /// @param sdkConfig MoEngageSDKConfig instance for SDK configuration
39
42
  /// @param launchOptions Launch Options dictionary
40
43
  /// @warning Make sure to call only one of the initialization methods available (either with plist OR with MOSDKConfig instance)
41
44
  /// @version 8.0.0 and above
42
- - (void)initializeDefaultSDKConfig:(MOSDKConfig*)sdkConfig andLaunchOptions:(NSDictionary*)launchOptions;
45
+ - (void)initializeDefaultSDKConfig:(MoEngageSDKConfig*)sdkConfig andLaunchOptions:(NSDictionary*)launchOptions;
43
46
 
44
- /// Initialization Methods to setup SDK with MOSDKConfig instance instead of from Info.plist file
45
- /// @param sdkConfig MOSDKConfig instance for SDK configuration
47
+ /// Initialization Methods to setup SDK with MoEngageSDKConfig instance instead of from Info.plist file
48
+ /// @param sdkConfig MoEngageSDKConfig instance for SDK configuration
46
49
  /// @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
50
  /// @param launchOptions Launch Options dictionary
48
51
  /// @warning Make sure to call only one of the initialization methods available (either with plist OR with MOSDKConfig instance)
49
52
  /// @version 8.1.0 and above
50
- - (void)initializeDefaultSDKConfigWithState:(MOSDKConfig*)sdkConfig withSDKState:(MoEngageSDKState)sdkState andLaunchOptions:(NSDictionary*)launchOptions;
53
+ - (void)initializeDefaultSDKConfigWithState:(MoEngageSDKConfig*)sdkConfig withSDKState:(MoEngageSDKState)sdkState andLaunchOptions:(NSDictionary*)launchOptions;
51
54
 
52
- /// Initialization Methods to setup SDK with MOSDKConfig instance instead of from Info.plist file
53
- /// @param sdkConfig MOSDKConfig instance for SDK configuration
55
+ /// Initialization Methods to setup SDK with MoEngageSDKConfig instance instead of from Info.plist file
56
+ /// @param sdkConfig MoEngageSDKConfig instance for SDK configuration
54
57
  /// @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
58
  /// @param launchOptions Launch Options dictionary
56
59
  /// @warning Make sure to call only one of the initialization methods available (either with plist OR with MOSDKConfig instance)
57
60
  /// @version 8.0.0 and above
58
- - (void)initializeDefaultSDKConfig:(MOSDKConfig*)sdkConfig withSDKState:(BOOL)isSdkEnabled andLaunchOptions:(NSDictionary*)launchOptions __deprecated_msg("Use initializeDefaultSDKConfigWithState:andLaunchOptions instead.");
61
+ - (void)initializeDefaultSDKConfig:(MoEngageSDKConfig*)sdkConfig withSDKState:(BOOL)isSdkEnabled andLaunchOptions:(NSDictionary*)launchOptions __deprecated_msg("Use initializeDefaultSDKConfigWithState:andLaunchOptions instead.");
59
62
  @end
60
63
 
61
64
  NS_ASSUME_NONNULL_END
@@ -9,10 +9,9 @@
9
9
  #import "MoEngageReactPluginInfo.h"
10
10
  #import "MoEngageReactConstants.h"
11
11
  #import "MoEReactBridge.h"
12
- @import MoEngageSDK;
12
+ #import <MoEngageSDK/MoEngageSDK.h>
13
+ #import <MoEngageObjCUtils/MoEngageObjCUtils.h>
13
14
  @import MoEngagePluginBase;
14
- @import MoEngageObjCUtils;
15
-
16
15
  @interface MoEngageInitializer() <MoEngagePluginBridgeDelegate>
17
16
 
18
17
  @end
@@ -35,29 +34,29 @@
35
34
  [self initializeDefaultSDKConfig:[self fetchSDKConfig] andLaunchOptions:launchOptions];
36
35
  }
37
36
 
38
- - (void)initializeDefaultSDKConfig:(MOSDKConfig*)sdkConfig andLaunchOptions:(NSDictionary*)launchOptions{
37
+ - (void)initializeDefaultSDKConfig:(MoEngageSDKConfig*)sdkConfig andLaunchOptions:(NSDictionary*)launchOptions{
39
38
  MoEngagePlugin *plugin = [[MoEngagePlugin alloc] init];
40
39
  [plugin initializeDefaultInstanceWithSdkConfig:sdkConfig launchOptions:launchOptions];
41
40
  [self commonSetUp:plugin identifier:sdkConfig.identifier];
42
41
  }
43
42
 
44
43
  - (void)initializeDefaultInstance:(BOOL)isSdkEnabled andLaunchOptions:(NSDictionary*)launchOptions{
45
- MOSDKConfig *sdkConfig = [self fetchSDKConfig];
44
+ MoEngageSDKConfig *sdkConfig = [self fetchSDKConfig];
46
45
  MoEngageSDKState currentSDKState = isSdkEnabled ? MoEngageSDKStateEnabled: MoEngageSDKStateDisabled;
47
46
  [self initializeDefaultSDKConfigWithState:sdkConfig withSDKState:currentSDKState andLaunchOptions:launchOptions];
48
47
  }
49
48
 
50
49
  - (void)initializeDefaultInstanceWithState:(MoEngageSDKState)sdkState andLaunchOptions:(NSDictionary*)launchOptions{
51
- MOSDKConfig *sdkConfig = [self fetchSDKConfig];
50
+ MoEngageSDKConfig *sdkConfig = [self fetchSDKConfig];
52
51
  [self initializeDefaultSDKConfigWithState:sdkConfig withSDKState:sdkState andLaunchOptions:launchOptions];
53
52
  }
54
53
 
55
- - (void)initializeDefaultSDKConfig:(MOSDKConfig*)sdkConfig withSDKState:(BOOL)isSDKEnabled andLaunchOptions:(NSDictionary*)launchOptions{
54
+ - (void)initializeDefaultSDKConfig:(MoEngageSDKConfig*)sdkConfig withSDKState:(BOOL)isSDKEnabled andLaunchOptions:(NSDictionary*)launchOptions{
56
55
  MoEngageSDKState currentSDKState = isSDKEnabled ? MoEngageSDKStateEnabled: MoEngageSDKStateDisabled;
57
56
  [self initializeDefaultSDKConfigWithState:sdkConfig withSDKState:currentSDKState andLaunchOptions:launchOptions];
58
57
  }
59
58
 
60
- - (void)initializeDefaultSDKConfigWithState:(MOSDKConfig*)sdkConfig withSDKState:(MoEngageSDKState)sdkState andLaunchOptions:(NSDictionary*)launchOptions{
59
+ - (void)initializeDefaultSDKConfigWithState:(MoEngageSDKConfig *)sdkConfig withSDKState:(MoEngageSDKState)sdkState andLaunchOptions:(NSDictionary*)launchOptions{
61
60
 
62
61
  MoEngagePlugin *plugin = [[MoEngagePlugin alloc] init];
63
62
  [plugin initializeDefaultInstanceWithSdkConfig:sdkConfig sdkState:sdkState launchOptions:launchOptions];
@@ -75,9 +74,9 @@
75
74
  [[MoEngagePluginBridge sharedInstance] setPluginBridgeDelegate:self identifier:identifier];
76
75
  }
77
76
 
78
- -(MOSDKConfig*)fetchSDKConfig {
77
+ -(MoEngageSDKConfig*)fetchSDKConfig {
79
78
  NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary];
80
- MOSDKConfig *sdkConfig;
79
+ MoEngageSDKConfig *sdkConfig;
81
80
 
82
81
  if ( [infoDict objectForKey: kMoEngage] != nil && [infoDict objectForKey: kMoEngage] != [NSNull null]) {
83
82
  NSDictionary* moeDict = [infoDict objectForKey: kMoEngage];
@@ -85,7 +84,7 @@
85
84
 
86
85
  NSString *appId = [moeDict objectForKey: kAppId];
87
86
  if (appId.length > 0) {
88
- sdkConfig = [[MOSDKConfig alloc] initWithAppID:appId];
87
+ sdkConfig = [[MoEngageSDKConfig alloc] initWithAppID:appId];
89
88
  }
90
89
  } else {
91
90
  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");
@@ -120,20 +119,23 @@
120
119
  return sdkConfig;
121
120
  }
122
121
 
123
- - (MODataCenter)getDataCenterFromString:(NSString*)stringVal {
124
- MODataCenter dataCenter = MODataCenterData_center_01;
122
+ - (MoEngageDataCenter)getDataCenterFromString:(NSString*)stringVal {
123
+ MoEngageDataCenter dataCenter = MoEngageDataCenterData_center_01;
125
124
 
126
125
  if ([stringVal isEqual:kDataCenter1])
127
126
  {
128
- dataCenter = MODataCenterData_center_01;
127
+ dataCenter = MoEngageDataCenterData_center_01;
129
128
  }
130
129
  else if ([stringVal isEqual:kDataCenter2])
131
130
  {
132
- dataCenter = MODataCenterData_center_02;
131
+ dataCenter = MoEngageDataCenterData_center_02;
133
132
  }
134
133
  else if ([stringVal isEqual:kDataCenter3])
135
134
  {
136
- dataCenter = MODataCenterData_center_03;
135
+ dataCenter = MoEngageDataCenterData_center_03;
136
+ } else if ([stringVal isEqual: kDataCenter4])
137
+ {
138
+ dataCenter = MoEngageDataCenterData_center_04;
137
139
  }
138
140
  else
139
141
  {
@@ -27,6 +27,8 @@ extern NSString* const kEnableLogs;
27
27
  extern NSString* const kDataCenter1;
28
28
  extern NSString* const kDataCenter2;
29
29
  extern NSString* const kDataCenter3;
30
+ extern NSString* const kDataCenter4;
31
+
30
32
 
31
33
  //PayLoad Constants
32
34
  extern NSString* const kPayload;
@@ -24,6 +24,8 @@ NSString* const kEnableLogs = @"ENABLE_LOGS";
24
24
  NSString* const kDataCenter1 = @"DATA_CENTER_01";
25
25
  NSString* const kDataCenter2 = @"DATA_CENTER_02";
26
26
  NSString* const kDataCenter3 = @"DATA_CENTER_03";
27
+ NSString* const kDataCenter4 = @"DATA_CENTER_04";
28
+
27
29
 
28
30
  //PayLoad Constants
29
31
  NSString* const kPayload = @"payload";
@@ -1,2 +1,2 @@
1
1
  // Generated file, do not edit
2
- #define MOE_REACT_PLUGIN_VERSION @"8.0.0"
2
+ #define MOE_REACT_PLUGIN_VERSION @"8.1.2"
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Bucket
3
+ uuid = "A9D2CCE5-E1E4-46E2-8FD6-8A880E005343"
4
+ type = "1"
5
+ version = "2.0">
6
+ <Breakpoints>
7
+ <BreakpointProxy
8
+ BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
9
+ <BreakpointContent
10
+ uuid = "B5C2799E-B498-4B55-9AB4-16D905914902"
11
+ shouldBeEnabled = "Yes"
12
+ ignoreCount = "0"
13
+ continueAfterRunningActions = "No"
14
+ filePath = "MoEReactBridge/MOReactInitializer.m"
15
+ startingColumnNumber = "9223372036854775807"
16
+ endingColumnNumber = "9223372036854775807"
17
+ startingLineNumber = "34"
18
+ endingLineNumber = "34"
19
+ landmarkName = "-intializeSDKWithLaunchOptions:"
20
+ landmarkType = "7">
21
+ </BreakpointContent>
22
+ </BreakpointProxy>
23
+ </Breakpoints>
24
+ </Bucket>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-moengage",
3
- "version": "8.1.1",
3
+ "version": "8.2.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": [