@selligent-marketing-cloud/selligent-react-native 3.7.0 → 3.8.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/README.md +9 -5
- package/android/build.gradle +27 -18
- package/package.json +1 -1
- package/android/libs/RNSelligentMobileSDK.aar +0 -0
package/README.md
CHANGED
|
@@ -9,8 +9,8 @@ This module supports the following SDK and tools:
|
|
|
9
9
|
> **IMPORTANT** This module isn't built using ReactNative's new architecture! It is however compatible with apps that do adopt the new architecture, as far as they are using latest ReactNative's versions.
|
|
10
10
|
|
|
11
11
|
| SDK | Version |
|
|
12
|
-
| ------------------------------------------------------------------------------
|
|
13
|
-
| [Android SDK](https://github.com/SelligentMarketingCloud/MobileSDK-Android) | 4.
|
|
12
|
+
| ------------------------------------------------------------------------------ |---------|
|
|
13
|
+
| [Android SDK](https://github.com/SelligentMarketingCloud/MobileSDK-Android) | 4.5.0 |
|
|
14
14
|
| [iOS SDK](https://github.com/SelligentMarketingCloud/MobileSDK-iOS) | 3.8.1 |
|
|
15
15
|
| ReactNative | 0.72.4 |
|
|
16
16
|
| Expo SDK | 49 |
|
|
@@ -25,7 +25,7 @@ This module supports the following SDK and tools:
|
|
|
25
25
|
npm install @selligent-marketing-cloud/selligent-react-native --save
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
2. Create a `selligent.json` file (name is case sensitive) in the root of the React Native project with the following content:
|
|
28
|
+
2. Create a `selligent.json` file (name is case sensitive) in the root of the React Native project (you can alternatively place it inside another folder or inside a `selligent` folder which will automatically be checked by the wrapper) with the following content:
|
|
29
29
|
|
|
30
30
|
```json
|
|
31
31
|
{
|
|
@@ -170,7 +170,7 @@ This module supports the following SDK and tools:
|
|
|
170
170
|
|
|
171
171
|
1. Copy the `node_modules/@selligent-marketing-cloud/selligent-react-native/ios` folder to the **Xcode project**. Drop it under the `Libraries` Folder. This will link the module to the iOS project.
|
|
172
172
|
|
|
173
|
-
2. Drag and drop the `selligent.json` you created
|
|
173
|
+
2. Drag and drop the `selligent.json` you created (or the full folder(s) containing it) to the Xcode project inside the `Copy Bundle Resources` in `Build phases` of your target:
|
|
174
174
|
|
|
175
175
|
> Do not check the "copy if needed" option to make sure you only have to manage one selligent.json file
|
|
176
176
|
|
|
@@ -194,6 +194,8 @@ This module supports the following SDK and tools:
|
|
|
194
194
|
// launchOptions = [NSMutableDictionary new];
|
|
195
195
|
// }
|
|
196
196
|
// [launchOptions setValue:@"alternativeFileName" forKey:@"RN_SELLIGENT_JSON"];
|
|
197
|
+
// [launchOptions setValue:@"selligent/alternativeFileName" forKey:@"RN_SELLIGENT_JSON"];
|
|
198
|
+
// [launchOptions setValue:@"alternativeFolder/alternativeFileName" forKey:@"RN_SELLIGENT_JSON"];
|
|
197
199
|
|
|
198
200
|
// At the end of application:didFinishLaunchingWithOptions:
|
|
199
201
|
[RNSelligent configureWithLaunchOptions:launchOptions];
|
|
@@ -204,7 +206,7 @@ This module supports the following SDK and tools:
|
|
|
204
206
|
<details open>
|
|
205
207
|
<summary>With autolinking (RN 0.60 and above)</summary>
|
|
206
208
|
|
|
207
|
-
1. Drag and drop the `selligent.json` you created
|
|
209
|
+
1. Drag and drop the `selligent.json` you created (or the full folder(s) containing it) to the Xcode project inside the `Copy Bundle Resources` in `Build phases` of your target:
|
|
208
210
|
|
|
209
211
|
> Do not check the "copy if needed" option to make sure you only have to manage one selligent.json file
|
|
210
212
|
|
|
@@ -222,6 +224,8 @@ This module supports the following SDK and tools:
|
|
|
222
224
|
// launchOptions = [NSMutableDictionary new];
|
|
223
225
|
// }
|
|
224
226
|
// [launchOptions setValue:@"alternativeFileName" forKey:@"RN_SELLIGENT_JSON"];
|
|
227
|
+
// [launchOptions setValue:@"selligent/alternativeFileName" forKey:@"RN_SELLIGENT_JSON"];
|
|
228
|
+
// [launchOptions setValue:@"alternativeFolder/alternativeFileName" forKey:@"RN_SELLIGENT_JSON"];
|
|
225
229
|
|
|
226
230
|
// At the end of application:didFinishLaunchingWithOptions:
|
|
227
231
|
[RNSelligent configureWithLaunchOptions:launchOptions];
|
package/android/build.gradle
CHANGED
|
@@ -8,7 +8,7 @@ buildscript {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
dependencies {
|
|
11
|
-
classpath 'com.android.tools.build:gradle:8.
|
|
11
|
+
classpath 'com.android.tools.build:gradle:8.2.2'
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -26,12 +26,6 @@ android {
|
|
|
26
26
|
buildFeatures {
|
|
27
27
|
buildConfig true
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
sourceSets {
|
|
31
|
-
main {
|
|
32
|
-
jniLibs.srcDirs = ['libs']
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
29
|
}
|
|
36
30
|
|
|
37
31
|
androidComponents {
|
|
@@ -62,15 +56,15 @@ dependencies {
|
|
|
62
56
|
exclude group:'com.facebook.fbjni'
|
|
63
57
|
exclude group:'com.facebook.yoga'
|
|
64
58
|
}
|
|
65
|
-
implementation 'com.selligent.sdk:selligent_mobile_sdk:4.
|
|
66
|
-
implementation 'com.google.code.gson:gson:2.
|
|
67
|
-
implementation 'com.google.firebase:firebase-messaging:23.
|
|
68
|
-
implementation 'androidx.work:work-runtime:2.
|
|
59
|
+
implementation 'com.selligent.sdk:selligent_mobile_sdk:4.5.0'
|
|
60
|
+
implementation 'com.google.code.gson:gson:2.10.1'
|
|
61
|
+
implementation 'com.google.firebase:firebase-messaging:23.4.1'
|
|
62
|
+
implementation 'androidx.work:work-runtime:2.9.0'
|
|
69
63
|
implementation 'androidx.concurrent:concurrent-futures:1.1.0'
|
|
70
64
|
implementation 'androidx.cardview:cardview:1.0.0'
|
|
71
65
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1'
|
|
72
|
-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.
|
|
73
|
-
implementation
|
|
66
|
+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'
|
|
67
|
+
implementation 'com.selligent.sdk:selligent_mobile_reactnative_sdk:3.8.0'
|
|
74
68
|
}
|
|
75
69
|
|
|
76
70
|
def loadSelligentSettings(variant) {
|
|
@@ -79,9 +73,9 @@ def loadSelligentSettings(variant) {
|
|
|
79
73
|
def variantFileName = "selligent.${variant.getName()}.json"
|
|
80
74
|
def resultingSettings = null
|
|
81
75
|
|
|
82
|
-
File variantFile =
|
|
83
|
-
File defaultFile =
|
|
84
|
-
File flavorFile =
|
|
76
|
+
File variantFile = getFile(variantFileName)
|
|
77
|
+
File defaultFile = getFile(defaultFileName)
|
|
78
|
+
File flavorFile = getFile("$currentFlavor/$defaultFileName")
|
|
85
79
|
|
|
86
80
|
if (variantFile.exists()) {
|
|
87
81
|
println("Reading Marigold Engage properties for variant ${variant.getName()} from $variantFile.path")
|
|
@@ -108,16 +102,31 @@ def loadSelligentSettings(variant) {
|
|
|
108
102
|
}
|
|
109
103
|
}
|
|
110
104
|
else {
|
|
111
|
-
|
|
105
|
+
println("WARNING: No selligent.json file could be found for the given task. Disregard this message if the executing task is not building/executing the app.")
|
|
112
106
|
}
|
|
113
107
|
|
|
114
108
|
return resultingSettings
|
|
115
109
|
}
|
|
116
110
|
|
|
111
|
+
def getFile(filePath) {
|
|
112
|
+
File defaultFile = new File("$project.rootDir/../$filePath")
|
|
113
|
+
File unifiedLocationFile = new File("$project.rootDir/../selligent/$filePath")
|
|
114
|
+
|
|
115
|
+
if (defaultFile.exists()) {
|
|
116
|
+
println("selligent.json found in the root of the project")
|
|
117
|
+
return defaultFile
|
|
118
|
+
}
|
|
119
|
+
else if (unifiedLocationFile.exists()) {
|
|
120
|
+
println("selligent.json found in the unified `selligent` folder")
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return unifiedLocationFile
|
|
124
|
+
}
|
|
125
|
+
|
|
117
126
|
def getCurrentFlavor() {
|
|
118
127
|
Gradle gradle = getGradle()
|
|
119
128
|
String tskReqStr = gradle.getStartParameter().getTaskRequests().toString()
|
|
120
|
-
Pattern pattern = Pattern.compile("(install|assemble)(\\w+)(Release|Debug)")
|
|
129
|
+
Pattern pattern = Pattern.compile("(install|assemble|bundle)(\\w+)(Release|Debug)")
|
|
121
130
|
Matcher matcher = pattern.matcher(tskReqStr)
|
|
122
131
|
|
|
123
132
|
if (matcher.find()) {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
},
|
|
5
5
|
"name": "@selligent-marketing-cloud/selligent-react-native",
|
|
6
6
|
"title": "Marigold Engage React Native",
|
|
7
|
-
"version": "3.
|
|
7
|
+
"version": "3.8.0",
|
|
8
8
|
"description": "React Native wrapper for the Marigold Engage Android and iOS SDKs",
|
|
9
9
|
"main": "index.js",
|
|
10
10
|
"repository": {
|
|
Binary file
|