react-native-expo-moengage 1.0.1 → 1.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 +11 -0
- package/LICENSE.md +12 -0
- package/apple/ExpoAdapterMoEngage/MoEngageAppDelegate.swift +0 -1
- package/build/android/constants.js +1 -2
- package/build/android/utils.js +22 -0
- package/build/android/withMoEngageAndroid.js +10 -10
- package/package.json +2 -2
- package/src/android/constants.ts +1 -2
- package/src/android/utils.ts +27 -0
- package/src/android/withMoEngageAndroid.ts +19 -18
- package/LICENSE.txt +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
# 09-02-2026
|
|
2
|
+
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
- License Update
|
|
6
|
+
- Fixing the failing cases due to types/node version update
|
|
7
|
+
- Android
|
|
8
|
+
- Compatibility changes for "Bundling `MoEFireBaseMessagingService` in Plugin's manifest to reduce integration steps for developers using FCM Push." in core plugin
|
|
9
|
+
- iOS
|
|
10
|
+
- Added no-code SDK file based initialization
|
|
11
|
+
|
|
1
12
|
# 25-08-2025
|
|
2
13
|
|
|
3
14
|
## 1.0.1
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Copyright (c) 2026 MoEngage, Inc.
|
|
2
|
+
All rights reserved.
|
|
3
|
+
Use of source code or binaries contained within MoEngage's SDKs is permitted only to enable use of the MoEngage platform by customers of MoEngage. The Licensee may not:
|
|
4
|
+
- permit any third party to use the Software;
|
|
5
|
+
- modify or translate the Software except as otherwise permitted;
|
|
6
|
+
- reverse engineer, decompile, or disassemble the Software;
|
|
7
|
+
- copy the Software, except as expressly provided above; or
|
|
8
|
+
- remove or obscure any proprietary rights notices or labels on the Software.
|
|
9
|
+
- Licensee may not transfer the Software or any rights under this Agreement without the Licensor's prior written consent.
|
|
10
|
+
- MoEngage owns the Software and all intellectual property rights embodied therein, including copyrights and valuable trade secrets embodied in the Software. The Licensee shall not alter or remove this copyright notice.
|
|
11
|
+
|
|
12
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE USER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -19,7 +19,6 @@ public class MoEngageAppDelegate: ExpoAppDelegateSubscriber {
|
|
|
19
19
|
let sdkConfig = plugin.initializeDefaultInstance(withAdditionalConfig: config)
|
|
20
20
|
else { return false }
|
|
21
21
|
plugin.trackPluginInfo(MoEngageExpoPluginInfo.name, version: MoEngageExpoPluginInfo.moduleVersion)
|
|
22
|
-
MoEngageInitializer.sharedInstance().setPluginBridgeDelegate(sdkConfig.appId)
|
|
23
22
|
return true
|
|
24
23
|
}
|
|
25
24
|
|
|
@@ -26,9 +26,8 @@ exports.moEngageFCMServiceName = 'com.moengage.firebase.MoEFireBaseMessagingServ
|
|
|
26
26
|
exports.moEngageFCMServiceEntry = {
|
|
27
27
|
$: {
|
|
28
28
|
'android:name': exports.moEngageFCMServiceName,
|
|
29
|
-
'
|
|
29
|
+
'tools:node': "remove",
|
|
30
30
|
},
|
|
31
|
-
'intent-filter': exports.moEngageMessagingIntentFilter,
|
|
32
31
|
};
|
|
33
32
|
/**
|
|
34
33
|
* Service entry for MoEngage Push Notification handling with expo notification integration
|
package/build/android/utils.js
CHANGED
|
@@ -12,13 +12,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.addServiceWithToolsRemove = addServiceWithToolsRemove;
|
|
15
16
|
exports.addServiceToManifestIfNotExist = addServiceToManifestIfNotExist;
|
|
16
17
|
exports.isServiceExistInManifest = isServiceExistInManifest;
|
|
17
18
|
exports.addServiceToManifest = addServiceToManifest;
|
|
18
19
|
exports.copyFile = copyFile;
|
|
20
|
+
exports.addToolsNamespaceToManifest = addToolsNamespaceToManifest;
|
|
19
21
|
exports.addDependencyToGradle = addDependencyToGradle;
|
|
20
22
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
21
23
|
const node_path_1 = __importDefault(require("node:path"));
|
|
24
|
+
/**
|
|
25
|
+
* Add serviceEntry to the main application manifest if does not already exist.
|
|
26
|
+
*/
|
|
27
|
+
function addServiceWithToolsRemove(manifest, mainApplication, serviceEntry, serviceName) {
|
|
28
|
+
addToolsNamespaceToManifest(manifest);
|
|
29
|
+
addServiceToManifestIfNotExist(mainApplication, serviceEntry, serviceName);
|
|
30
|
+
return mainApplication;
|
|
31
|
+
}
|
|
22
32
|
/**
|
|
23
33
|
* Add serviceEntry to the main application manifest if does not already exist.
|
|
24
34
|
*/
|
|
@@ -65,6 +75,18 @@ function copyFile(src, dest) {
|
|
|
65
75
|
node_fs_1.default.copyFileSync(src, destPath);
|
|
66
76
|
});
|
|
67
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Add tools namespace to the manifest tag if not already present.
|
|
80
|
+
*/
|
|
81
|
+
function addToolsNamespaceToManifest(manifest) {
|
|
82
|
+
if (!manifest.$) {
|
|
83
|
+
manifest.$ = {};
|
|
84
|
+
}
|
|
85
|
+
if (!manifest.$['xmlns:tools']) {
|
|
86
|
+
console.log('Adding tools namespace to manifest');
|
|
87
|
+
manifest.$['xmlns:tools'] = 'http://schemas.android.com/tools';
|
|
88
|
+
}
|
|
89
|
+
}
|
|
68
90
|
/**
|
|
69
91
|
* Add a dependency to the dependencies block in app/build.gradle if not already present.
|
|
70
92
|
*/
|
|
@@ -45,20 +45,20 @@ const withMoEngageAndroidManifest = (config, props) => {
|
|
|
45
45
|
return config;
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
(0, config_plugins_1.withAndroidManifest)(config, config => {
|
|
49
|
+
const mainApplication = config_plugins_1.AndroidConfig.Manifest.getMainApplicationOrThrow(config.modResults);
|
|
50
|
+
if (props.android.shouldIncludeMoEngageFirebaseMessagingService) {
|
|
51
51
|
if (props.android.isExpoNotificationIntegration) {
|
|
52
52
|
console.log('Adding Expo Notification Service to manifest');
|
|
53
53
|
(0, utils_1.addServiceToManifestIfNotExist)(mainApplication, constants_1.moEngageExpoNotificationServiceEntry, constants_1.moEngageExpoNotificationServiceName);
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
console.log('Adding MoEngage FCM Service to manifest with tool node remove');
|
|
58
|
+
(0, utils_1.addServiceWithToolsRemove)(config.modResults.manifest, mainApplication, constants_1.moEngageFCMServiceEntry, constants_1.moEngageFCMServiceName);
|
|
59
|
+
}
|
|
60
|
+
return config;
|
|
61
|
+
});
|
|
62
62
|
return config;
|
|
63
63
|
};
|
|
64
64
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-expo-moengage",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"dependencyVersions": {
|
|
5
5
|
"firebaseMessaging": "24.1.0"
|
|
6
6
|
},
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"contributors": [
|
|
48
48
|
"MoEngage <mobiledevs@moengage.com>"
|
|
49
49
|
],
|
|
50
|
-
"license": "SEE LICENSE IN LICENSE.
|
|
50
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@expo/config-plugins": "^5.0.0",
|
|
53
53
|
"@expo/config-types": "^53.0.4",
|
package/src/android/constants.ts
CHANGED
|
@@ -28,9 +28,8 @@ export const moEngageFCMServiceName = 'com.moengage.firebase.MoEFireBaseMessagin
|
|
|
28
28
|
export const moEngageFCMServiceEntry = {
|
|
29
29
|
$: {
|
|
30
30
|
'android:name': moEngageFCMServiceName,
|
|
31
|
-
'
|
|
31
|
+
'tools:node': "remove",
|
|
32
32
|
},
|
|
33
|
-
'intent-filter': moEngageMessagingIntentFilter,
|
|
34
33
|
};
|
|
35
34
|
|
|
36
35
|
/**
|
package/src/android/utils.ts
CHANGED
|
@@ -2,6 +2,20 @@ import { ManifestApplication } from "@expo/config-plugins/build/android/Manifest
|
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Add serviceEntry to the main application manifest if does not already exist.
|
|
7
|
+
*/
|
|
8
|
+
export function addServiceWithToolsRemove(
|
|
9
|
+
manifest: any,
|
|
10
|
+
mainApplication: ManifestApplication,
|
|
11
|
+
serviceEntry: any,
|
|
12
|
+
serviceName: string
|
|
13
|
+
): ManifestApplication {
|
|
14
|
+
addToolsNamespaceToManifest(manifest);
|
|
15
|
+
addServiceToManifestIfNotExist(mainApplication, serviceEntry, serviceName)
|
|
16
|
+
return mainApplication;
|
|
17
|
+
}
|
|
18
|
+
|
|
5
19
|
/**
|
|
6
20
|
* Add serviceEntry to the main application manifest if does not already exist.
|
|
7
21
|
*/
|
|
@@ -56,6 +70,19 @@ export async function copyFile(src: string, dest: string) {
|
|
|
56
70
|
fs.copyFileSync(src, destPath);
|
|
57
71
|
}
|
|
58
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Add tools namespace to the manifest tag if not already present.
|
|
75
|
+
*/
|
|
76
|
+
export function addToolsNamespaceToManifest(manifest: any): void {
|
|
77
|
+
if (!manifest.$) {
|
|
78
|
+
manifest.$ = {};
|
|
79
|
+
}
|
|
80
|
+
if (!manifest.$['xmlns:tools']) {
|
|
81
|
+
console.log('Adding tools namespace to manifest');
|
|
82
|
+
manifest.$['xmlns:tools'] = 'http://schemas.android.com/tools';
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
59
86
|
/**
|
|
60
87
|
* Add a dependency to the dependencies block in app/build.gradle if not already present.
|
|
61
88
|
*/
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
googleFirebaseMessagingModule
|
|
12
12
|
} from './constants';
|
|
13
13
|
import { MoEngagePluginProps } from '../types';
|
|
14
|
-
import { addServiceToManifestIfNotExist, copyFile, addDependencyToGradle } from './utils';
|
|
14
|
+
import { addServiceToManifestIfNotExist, copyFile, addDependencyToGradle, addServiceWithToolsRemove } from './utils';
|
|
15
15
|
|
|
16
16
|
const packageJsonFile = require('../../package.json');
|
|
17
17
|
|
|
@@ -41,7 +41,7 @@ const withMoEngageAndroidManifest: ConfigPlugin<MoEngagePluginProps> = (config,
|
|
|
41
41
|
const androidName = (mainApplication as any)["android:name"] || "";
|
|
42
42
|
mainApplication.$ = { "android:name": androidName };
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
if (!(key in mainApplication.$)) {
|
|
46
46
|
mainApplication.$[key] = value;
|
|
47
47
|
}
|
|
@@ -52,28 +52,29 @@ const withMoEngageAndroidManifest: ConfigPlugin<MoEngagePluginProps> = (config,
|
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
withAndroidManifest(config, config => {
|
|
56
|
+
const mainApplication = AndroidConfig.Manifest.getMainApplicationOrThrow(config.modResults);
|
|
57
|
+
if (props.android.shouldIncludeMoEngageFirebaseMessagingService) {
|
|
58
58
|
if (props.android.isExpoNotificationIntegration) {
|
|
59
59
|
console.log('Adding Expo Notification Service to manifest');
|
|
60
|
-
addServiceToManifestIfNotExist(
|
|
61
|
-
mainApplication,
|
|
62
|
-
moEngageExpoNotificationServiceEntry,
|
|
63
|
-
moEngageExpoNotificationServiceName
|
|
64
|
-
);
|
|
65
|
-
} else {
|
|
66
|
-
console.log('Adding MoEngage FCM Service to manifest');
|
|
67
60
|
addServiceToManifestIfNotExist(
|
|
68
61
|
mainApplication,
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
moEngageExpoNotificationServiceEntry,
|
|
63
|
+
moEngageExpoNotificationServiceName
|
|
71
64
|
);
|
|
72
65
|
}
|
|
66
|
+
} else {
|
|
67
|
+
console.log('Adding MoEngage FCM Service to manifest with tool node remove');
|
|
68
|
+
addServiceWithToolsRemove(
|
|
69
|
+
config.modResults.manifest,
|
|
70
|
+
mainApplication,
|
|
71
|
+
moEngageFCMServiceEntry,
|
|
72
|
+
moEngageFCMServiceName
|
|
73
|
+
);
|
|
74
|
+
}
|
|
73
75
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
76
|
+
return config;
|
|
77
|
+
});
|
|
77
78
|
|
|
78
79
|
return config;
|
|
79
80
|
};
|
|
@@ -95,7 +96,7 @@ const withMoEngageInitialisationConfigResource: ConfigPlugin<MoEngagePluginProps
|
|
|
95
96
|
console.log('Copying large icon:', props.android.largeIconPath);
|
|
96
97
|
await copyFile(props.android.largeIconPath, drawableResourcePath);
|
|
97
98
|
}
|
|
98
|
-
|
|
99
|
+
|
|
99
100
|
console.log('Copying config file:', props.android.configFilePath);
|
|
100
101
|
await copyFile(props.android.configFilePath, xmlValuesResourcePath);
|
|
101
102
|
return config;
|
package/LICENSE.txt
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
The Licensee desires to conduct a technical trial (hereafter referred to as the "Trial") or deployment of the source code or binaries contained within MoEngage SDK (“Software”) under a limited license from the Licensor.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
The Licensee may not modify: (i) permit any third party to use the Software; (ii) modify or translate the Software except as otherwise permitted; (iii) reverse engineer, decompile, or disassemble the Software; (iv) copy the Software, except as expressly provided above; or (vi) remove or obscure any proprietary rights notices or labels on the Software.
|
|
5
|
-
Licensee may not transfer the Software or any rights under this Agreement without the Licensor's prior written consent.
|
|
6
|
-
MoEngage owns the Software and all intellectual property rights embodied therein, including copyrights and valuable trade secrets embodied in the Software.
|
|
7
|
-
The Licensee shall not alter or remove this copyright notice.
|
|
8
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE USER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|