react-native-moengage 12.0.0 → 12.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 CHANGED
@@ -1,3 +1,11 @@
1
+ # 29-07-2025
2
+
3
+ ## 12.1.0
4
+ - Android
5
+ - Added support to include optional module using configuration in package json file
6
+ - iOS
7
+ - `MoEngage-iOS-SDK` version updated to `10.03.2`
8
+
1
9
  # 17-07-2025
2
10
 
3
11
  ## 12.0.0
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
17
17
  s.public_header_files = 'iOS/MoEReactBridge/{MoEngageInitializer,MoEngageReactSDKInitializationConfig,MoEngageReactUtils}.h'
18
18
  s.weak_framework = 'UserNotifications'
19
19
  s.dependency 'React'
20
- s.dependency 'MoEngagePluginBase','6.2.1'
20
+ s.dependency 'MoEngagePluginBase','6.2.2'
21
21
  s.ios.dependency 'MoEngage-iOS-SDK/RichNotification'
22
22
 
23
23
  s.prepare_command = <<-CMD
@@ -1,5 +1,6 @@
1
1
  buildscript {
2
2
  ext.kotlinVersion = '1.9.23'
3
+
3
4
  repositories {
4
5
  google()
5
6
  mavenCentral()
@@ -19,11 +20,6 @@ rootProject.allprojects {
19
20
  }
20
21
 
21
22
  ext {
22
- //dependency version
23
- moengageCoreVersion = "14.03.00"
24
- moengageInAppVersion = "9.2.0"
25
- basePluginVersion = "5.1.0"
26
- //build versions
27
23
  minimumVersion = 23
28
24
  compileVersion = 35
29
25
  }
@@ -80,17 +76,10 @@ dependencies {
80
76
 
81
77
  compileOnly('com.facebook.react:react-native')
82
78
  compileOnly("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
83
-
84
- api("com.moengage:moe-android-sdk:$moengageCoreVersion")
85
- api("com.moengage:inapp:$moengageInAppVersion")
86
- api("com.moengage:plugin-base:$basePluginVersion")
87
79
  }
88
80
 
89
81
  apply from: file("./user-agent.gradle")
90
-
91
- repositories {
92
- mavenCentral()
93
- }
82
+ apply from: file("./moengage-dependency-helper.gradle")
94
83
 
95
84
  def isNewArchitectureEnabled() {
96
85
  return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
@@ -0,0 +1,72 @@
1
+ import groovy.json.JsonSlurper
2
+
3
+ repositories {
4
+ google()
5
+ mavenCentral()
6
+ }
7
+
8
+ ext {
9
+ // MoEngage Versions
10
+ moengageCoreVersion = "14.03.00"
11
+ moengageInAppVersion = "9.2.0"
12
+ moengageRichNotification = "6.2.0"
13
+ moengageSecurity = "4.0.0"
14
+ moengageEncryptedStorage = "3.0.0"
15
+ moengagePushAmp = "6.1.0"
16
+ moengageHmsPushkit = "6.1.0"
17
+ moengageDeviceTrigger = "4.1.0"
18
+ moengageBasePluginVersion = "5.1.0"
19
+
20
+ // AndroidX Support Libraries Versions
21
+ androidXCore = "1.15.0"
22
+ androidXCompact = "1.7.0"
23
+ androidXLifecycle = "2.8.7"
24
+ }
25
+
26
+ dependencies {
27
+ api("com.moengage:moe-android-sdk:$moengageCoreVersion")
28
+ api("com.moengage:inapp:$moengageInAppVersion")
29
+ api("com.moengage:plugin-base:$moengageBasePluginVersion")
30
+
31
+ if (shouldIncludeModule("richNotification")) {
32
+ api("com.moengage:rich-notification:$moengageRichNotification")
33
+ }
34
+
35
+ if (shouldIncludeModule("encryption")) {
36
+ api("com.moengage:security:$moengageSecurity")
37
+ api("com.moengage:encrypted-storage:$moengageEncryptedStorage")
38
+ }
39
+
40
+ if (shouldIncludeModule("pushAmp")) {
41
+ api("com.moengage:push-amp:$moengagePushAmp")
42
+ }
43
+
44
+ if (shouldIncludeModule("hmsPushkit")) {
45
+ api("com.moengage:hms-pushkit:$moengageHmsPushkit")
46
+ }
47
+
48
+ if (shouldIncludeModule("deviceTrigger")) {
49
+ api("com.moengage:realtime-trigger:$moengageDeviceTrigger")
50
+ }
51
+
52
+ if (shouldIncludeModule("includeAndroidXRequiredLibraries")) {
53
+ api("androidx.core:core:$androidXCore")
54
+ api("androidx.appcompat:appcompat:$androidXCompact")
55
+ api("androidx.lifecycle:lifecycle-process:$androidXLifecycle")
56
+ }
57
+ }
58
+
59
+ def shouldIncludeModule(String moduleName) {
60
+ try {
61
+ File packageJsonFile = new File("$rootDir/../package.json")
62
+ def packageJson = new JsonSlurper().parseText(packageJsonFile.text)
63
+ def moengageJson = packageJson["moengage"]
64
+ if (moengageJson != null) {
65
+ return moengageJson[moduleName] == true
66
+ }
67
+ println("MoEngage modules not configured in package json")
68
+ } catch(FileNotFoundException exception) {
69
+ println("Default package json file not found")
70
+ }
71
+ return false
72
+ }
@@ -79,7 +79,6 @@ object MoEInitializer {
79
79
  ),
80
80
  sdkState = sdkState
81
81
  )
82
- Logger.print { "$tag initialize(): " }
83
82
  } catch (t: Throwable) {
84
83
  Logger.print(LogLevel.ERROR, t) { "$tag initialize(): " }
85
84
  }
@@ -49,6 +49,9 @@ NS_ASSUME_NONNULL_BEGIN
49
49
  /// Initialize Default Instance of SDK with Application's `Info.plist` data with optional react config.
50
50
  /// @param ractConfig Additional MoEngageReactSDKDefaultInitializationConfig.
51
51
  - (void)initializeDefaultInstanceWithAdditionalReactConfig:(MoEngageReactSDKDefaultInitializationConfig*)ractConfig;
52
+
53
+ /// Intenal method, not for public use.
54
+ - (void)setPluginBridgeDelegate: (NSString*)identifier;
52
55
  @end
53
56
 
54
57
  NS_ASSUME_NONNULL_END
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-moengage",
3
- "version": "12.0.0",
3
+ "version": "12.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
  "files": [
@@ -24,7 +24,8 @@
24
24
  "events"
25
25
  ],
26
26
  "scripts": {
27
- "test": "jest"
27
+ "test": "jest",
28
+ "build": "echo \"Not required\" && exit 0"
28
29
  },
29
30
  "author": {
30
31
  "name": "MoEngage",
package/src/index.ts CHANGED
@@ -63,6 +63,7 @@ import * as MoECoreHandler from "./utils/MoECoreHandler";
63
63
  import MoEAccessibilityData from "./models/campaignsCore/MoEAccessibilityData";
64
64
  import { KEY_ACCESSIBILITY } from "./utils/MoEConstants";
65
65
 
66
+ import MoEngagePersimissionResultData from "./models/MoEngagePersimissionResultData";
66
67
 
67
68
  const PLATFORM_IOS = "ios";
68
69
  const PLATFORM_ANDROID = "android";
@@ -134,8 +135,14 @@ function handleEventBroadcast(type: string | String, broadcast: string) {
134
135
  });
135
136
  }
136
137
 
137
- export type NotificationEventName = 'pushTokenGenerated' | 'pushClicked' | 'inAppCampaignShown' | 'inAppCampaignClicked' | 'inAppCampaignDismissed' | 'inAppCampaignCustomAction' | 'inAppCampaignSelfHandled';
138
-
138
+ export type NotificationEventName = 'pushTokenGenerated' |
139
+ 'pushClicked' |
140
+ 'inAppCampaignShown' |
141
+ 'inAppCampaignClicked' |
142
+ 'inAppCampaignDismissed' |
143
+ 'inAppCampaignCustomAction' |
144
+ 'inAppCampaignSelfHandled' |
145
+ 'permissionResult';
139
146
 
140
147
  type NotificationEventTypeMap = {
141
148
  "pushTokenGenerated": MoEPushToken,
@@ -144,7 +151,8 @@ type NotificationEventTypeMap = {
144
151
  "inAppCampaignClicked": MoEInAppData,
145
152
  "inAppCampaignDismissed": MoEInAppData,
146
153
  "inAppCampaignCustomAction": MoEInAppData,
147
- "inAppCampaignSelfHandled": MoESelfHandledCampaignData
154
+ "inAppCampaignSelfHandled": MoESelfHandledCampaignData,
155
+ "permissionResult": MoEngagePersimissionResultData
148
156
  }
149
157
 
150
158
  var ReactMoE = {
@@ -24,4 +24,5 @@ export default class MoEInAppRules {
24
24
  this.contexts = contexts;
25
25
  this.screenNames = screenNames;
26
26
  }
27
+
27
28
  }