@selligent-marketing-cloud/selligent-react-native 3.3.2 → 3.4.1
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 +11 -11
- package/android/build.gradle +11 -7
- package/android/src/main/AndroidManifest.xml +1 -6
- package/documentation/README.md +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,14 +6,14 @@ This module provides an API for the usage of the Selligent Mobile SDKs in React
|
|
|
6
6
|
|
|
7
7
|
This module supports the following SDK and tools:
|
|
8
8
|
|
|
9
|
-
> **IMPORTANT** This module
|
|
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
12
|
| ------------------------------------------------------------------------------ | ------- |
|
|
13
|
-
| [Android SDK](https://github.com/SelligentMarketingCloud/MobileSDK-Android) | 4.
|
|
14
|
-
| [iOS SDK](https://github.com/SelligentMarketingCloud/MobileSDK-iOS) | 3.
|
|
15
|
-
| ReactNative | 0.
|
|
16
|
-
| Expo SDK |
|
|
13
|
+
| [Android SDK](https://github.com/SelligentMarketingCloud/MobileSDK-Android) | 4.4.0 |
|
|
14
|
+
| [iOS SDK](https://github.com/SelligentMarketingCloud/MobileSDK-iOS) | 3.7.0 |
|
|
15
|
+
| ReactNative | 0.72.4 |
|
|
16
|
+
| Expo SDK | 49 |
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
@@ -41,7 +41,7 @@ This module supports the following SDK and tools:
|
|
|
41
41
|
|
|
42
42
|
### Android Specific Installation
|
|
43
43
|
|
|
44
|
-
> **IMPORTANT:** Since version 2.6.0 of this module we require your app to use the Android Gradle Plugin version
|
|
44
|
+
> **IMPORTANT:** Since version 2.6.0 of this module we require your app to use the Android Gradle Plugin version 7.0.0 or higher in order to build on Android.
|
|
45
45
|
|
|
46
46
|
> ### **Attention for Huawei developers!**
|
|
47
47
|
>
|
|
@@ -101,10 +101,10 @@ This module supports the following SDK and tools:
|
|
|
101
101
|
|
|
102
102
|
buildscript {
|
|
103
103
|
dependencies {
|
|
104
|
-
// Make sure your Gradle plugin version is >=
|
|
105
|
-
classpath("com.android.tools.build:gradle:
|
|
104
|
+
// Make sure your Gradle plugin version is >= 7.0.0
|
|
105
|
+
classpath("com.android.tools.build:gradle:7.0.0")
|
|
106
106
|
// Add the following:
|
|
107
|
-
classpath 'com.google.gms:google-services:4.3.
|
|
107
|
+
classpath 'com.google.gms:google-services:4.3.15'
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
```
|
|
@@ -170,7 +170,7 @@ This module supports the following SDK and tools:
|
|
|
170
170
|
buildscript {
|
|
171
171
|
dependencies {
|
|
172
172
|
// Add the following:
|
|
173
|
-
classpath 'com.google.gms:google-services:4.3.
|
|
173
|
+
classpath 'com.google.gms:google-services:4.3.15'
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
```
|
|
@@ -213,7 +213,7 @@ This module supports the following SDK and tools:
|
|
|
213
213
|
|
|
214
214
|
> Do not check the "copy if needed" option to make sure you only have to manage one selligent.json file
|
|
215
215
|
|
|
216
|
-
3. Add the native iOS SDK dependency in your Podfile: `s.dependency "SelligentMobileSDK/Framework", "3.
|
|
216
|
+
3. Add the native iOS SDK dependency in your Podfile: `s.dependency "SelligentMobileSDK/Framework", "3.7.0"` or download it manually from [here](https://github.com/SelligentMarketingCloud/MobileSDK-iOS/tree/master/Framework) and drag and drop it into you **Xcode project**.
|
|
217
217
|
|
|
218
218
|
4. Execute `pod install` in the `/ios` folder
|
|
219
219
|
|
package/android/build.gradle
CHANGED
|
@@ -8,20 +8,24 @@ buildscript {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
dependencies {
|
|
11
|
-
classpath 'com.android.tools.build:gradle:
|
|
11
|
+
classpath 'com.android.tools.build:gradle:7.0.0'
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
apply plugin: 'com.android.library'
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
android {
|
|
19
|
-
|
|
18
|
+
namespace 'com.selligent'
|
|
19
|
+
compileSdk 33
|
|
20
20
|
|
|
21
21
|
defaultConfig {
|
|
22
22
|
minSdkVersion 21
|
|
23
23
|
targetSdkVersion 33
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
buildFeatures {
|
|
27
|
+
buildConfig true
|
|
28
|
+
}
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
androidComponents {
|
|
@@ -33,7 +37,7 @@ androidComponents {
|
|
|
33
37
|
variant.buildConfigFields.put("SELLIGENT_SETTINGS", new BuildConfigField("String", "\"" + selligentSettings + "\"", "Selligent settings"))
|
|
34
38
|
}
|
|
35
39
|
catch (Exception ignored) {
|
|
36
|
-
throw new Exception("Selligent requires Android Gradle plugin version
|
|
40
|
+
throw new Exception("Selligent requires Android Gradle plugin version 7.0.0 or higher.")
|
|
37
41
|
}
|
|
38
42
|
}
|
|
39
43
|
})
|
|
@@ -53,9 +57,9 @@ dependencies {
|
|
|
53
57
|
exclude group:'com.facebook.fbjni'
|
|
54
58
|
exclude group:'com.facebook.yoga'
|
|
55
59
|
}
|
|
56
|
-
implementation 'com.selligent.sdk:selligent_mobile_sdk:4.
|
|
60
|
+
implementation 'com.selligent.sdk:selligent_mobile_sdk:4.4.0'
|
|
57
61
|
implementation 'com.google.code.gson:gson:2.9.0'
|
|
58
|
-
implementation 'com.google.firebase:firebase-messaging:23.
|
|
62
|
+
implementation 'com.google.firebase:firebase-messaging:23.2.1'
|
|
59
63
|
implementation 'androidx.work:work-runtime:2.8.1'
|
|
60
64
|
implementation 'androidx.concurrent:concurrent-futures:1.1.0'
|
|
61
65
|
implementation 'androidx.cardview:cardview:1.0.0'
|
|
@@ -68,7 +72,7 @@ def loadSelligentSettings(variant) {
|
|
|
68
72
|
def defaultSelligentFileName = "selligent.json"
|
|
69
73
|
File defaultFile = new File("$project.rootDir/../$defaultSelligentFileName")
|
|
70
74
|
|
|
71
|
-
if (currentFlavor
|
|
75
|
+
if (currentFlavor != "") {
|
|
72
76
|
defaultFile = new File("$project.rootDir/../$currentFlavor/$defaultSelligentFileName")
|
|
73
77
|
}
|
|
74
78
|
|
package/documentation/README.md
CHANGED
|
@@ -74,7 +74,7 @@ The following properties can be used in the `selligent.json` to further configur
|
|
|
74
74
|
| remoteMessageDisplayType | [enum](#remotemessagesdisplaytype) | The behaviour when receiving a push notification with the app in foreground |
|
|
75
75
|
| appGroupId | string |(iOS Only) The appgroup id necessary for the correct communication between the app and the app extensions |
|
|
76
76
|
| shouldClearBadge | boolean | (iOS Only) Whether or not, clicking a push notification should reset the badge number |
|
|
77
|
-
| shouldDisplayRemoteNotification | boolean | (iOS Only) Whether or not, the SDK should try to display the content linked to a push message (usually, inapp messages) or it will be handled customly
|
|
77
|
+
| shouldDisplayRemoteNotification | boolean | (iOS Only) Whether or not, the SDK should try to display the content linked to a push message (usually, inapp messages) or it will be handled customly
|
|
78
78
|
| enableiOSLogging | [enum](#iosloglevel) | Log level used since the app launch |
|
|
79
79
|
| enableAndroidLogging | boolean | (Android Only) Whether or not, the SDK logging will be enabled since the app launch |
|
|
80
80
|
| doNotListenToThePush | boolean | (Android Only) Whether or not, the SDK will listen for pushs from google |
|
|
@@ -93,12 +93,15 @@ The following properties can be used in the `selligent.json` to further configur
|
|
|
93
93
|
Follow the [iOS](https://github.com/SelligentMarketingCloud/MobileSDK-iOS/tree/master/Documentation#create-an-apns-key) & [Android](https://github.com/SelligentMarketingCloud/MobileSDK-Android/tree/master/Documentation#creating-an-application) native SDKs guides in order to optin for push notifications in Apple & Google.
|
|
94
94
|
|
|
95
95
|
**For Android**, if targeting API level 33 and above:
|
|
96
|
+
|
|
96
97
|
1. Add the following line to AndroidManifest.xml:
|
|
98
|
+
|
|
97
99
|
```xml
|
|
98
100
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
|
99
101
|
```
|
|
100
102
|
|
|
101
103
|
2. Add this native code to request the push permission and let the SDK know when it is accepted, in the activity where you want to:
|
|
104
|
+
|
|
102
105
|
```java
|
|
103
106
|
import com.selligent.RNSelligent;
|
|
104
107
|
|
|
@@ -867,7 +870,7 @@ Defines the type of an event.
|
|
|
867
870
|
| USER_REGISTER | number | 90 | Used to send a register event to the server with the custom email/profile identifier of the user, with the purpose of linking the device to an user and optionally storing some data at Selligent platform side. This event will create a new user in your Selligent database, if none was found (you can use an alternate key/value field to search for the user, in the data object, since by default the `email` one will use the `MAIL` column in your Selligent database). |
|
|
868
871
|
| USER_UNREGISTER | number | 91 | Used to send an unregister event to the server with the custom email/profile identifier of the user, with the purpose of keeping track of a REGISTERED flag and optionally storing some data at Selligent platform side (this event is not unlinking the user from the device (automatically), at the moment). |
|
|
869
872
|
| USER_LOGIN | number | 92 | Used to send a login event to the server with the custom email/profile identifier of the user, with the purpose of linking the device to an user and optionally storing some data at Selligent platform side. This event will **NOT** create a new user in your Selligent database, if none found. |
|
|
870
|
-
| USER_LOGOUT | number | 93 |
|
|
873
|
+
| USER_LOGOUT | number | 93 | Used to send a logout event to the server with the custom email/profile identifier of the user, with the purpose of keeping track of a LOGGED flag and optionally storing some data at Selligent platform side (this event is not unlinking the user from the device (automatically), at the moment). |
|
|
871
874
|
| CUSTOM | number | 94 | Used to send a custom event to the server, with the purpose of keeping track of storing some data at Selligent platform side. |
|
|
872
875
|
|
|
873
876
|
### NotificationButtonType
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
},
|
|
5
5
|
"name": "@selligent-marketing-cloud/selligent-react-native",
|
|
6
6
|
"title": "Selligent React Native",
|
|
7
|
-
"version": "3.
|
|
7
|
+
"version": "3.4.1",
|
|
8
8
|
"description": "React Native wrapper for the Selligent Marketing Cloud Android and iOS SDKs",
|
|
9
9
|
"main": "index.js",
|
|
10
10
|
"repository": {
|