react-native-netmera 1.7.0 → 1.7.2-beta01
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/.eslintignore +6 -0
- package/.github/workflows/run-prettier-action.yaml +1 -1
- package/README.md +8 -6
- package/RNNetmera.podspec +1 -1
- package/android/build.gradle +4 -0
- package/android/src/main/java/com/netmera/reactnativesdk/RNNetmera.java +1 -1
- package/android/src/main/java/com/netmera/reactnativesdk/RNNetmeraModule.java +5 -0
- package/index.ts +2 -0
- package/ios/RNNetmera.m +1 -1
- package/package.json +1 -1
- package/src/Netmera.ts +10 -3
package/.eslintignore
ADDED
package/README.md
CHANGED
|
@@ -210,9 +210,9 @@ export const onPushReceive = async (message) => {
|
|
|
210
210
|
|
|
211
211
|
```
|
|
212
212
|
// For receiving Media Push, you must add Netmera pods to top of your Podfile.
|
|
213
|
-
pod "Netmera", "3.23.
|
|
214
|
-
pod "Netmera/NotificationServiceExtension", "3.23.
|
|
215
|
-
pod "Netmera/NotificationContentExtension", "3.23.
|
|
213
|
+
pod "Netmera", "3.23.3-WithoutDependency"
|
|
214
|
+
pod "Netmera/NotificationServiceExtension", "3.23.3-WithoutDependency"
|
|
215
|
+
pod "Netmera/NotificationContentExtension", "3.23.3-WithoutDependency"
|
|
216
216
|
```
|
|
217
217
|
|
|
218
218
|
5. In order to use the widget URL callback, add these methods to between `@implementation AppDelegate` and `@end`.
|
|
@@ -380,9 +380,11 @@ You can send your events as follows. For more examples, please see the [example
|
|
|
380
380
|
In order to manage your deeplinks, use the following method instead of `Linking.getInitialURL`
|
|
381
381
|
|
|
382
382
|
```
|
|
383
|
-
Netmera.getInitialURL(url => {
|
|
384
|
-
|
|
385
|
-
|
|
383
|
+
Netmera.getInitialURL().then(url => {
|
|
384
|
+
if (url) {
|
|
385
|
+
console.log(url);
|
|
386
|
+
}
|
|
387
|
+
});
|
|
386
388
|
```
|
|
387
389
|
|
|
388
390
|
You can use other `Linking` methods as before
|
package/RNNetmera.podspec
CHANGED
package/android/build.gradle
CHANGED
|
@@ -3,6 +3,10 @@ apply plugin: 'com.android.library'
|
|
|
3
3
|
android {
|
|
4
4
|
compileSdk 33
|
|
5
5
|
|
|
6
|
+
// Conditional for compatibility with AGP <4.2.
|
|
7
|
+
if (project.android.hasProperty("namespace")) {
|
|
8
|
+
namespace "com.netmera.reactnativesdk"
|
|
9
|
+
}
|
|
6
10
|
defaultConfig {
|
|
7
11
|
minSdkVersion 21
|
|
8
12
|
targetSdkVersion 33
|
|
@@ -23,7 +23,7 @@ public class RNNetmera {
|
|
|
23
23
|
static void setNetmeraHeaders() {
|
|
24
24
|
ContentValues headerValues = new ContentValues();
|
|
25
25
|
headerValues.put("X-netmera-framework", "react");
|
|
26
|
-
headerValues.put("X-netmera-frameworkV", "1.7.
|
|
26
|
+
headerValues.put("X-netmera-frameworkV", "1.7.2");
|
|
27
27
|
Netmera.setNetmeraHeaders(headerValues);
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -100,6 +100,11 @@ public class RNNetmeraModule extends ReactContextBaseJavaModule {
|
|
|
100
100
|
Netmera.setBaseUrl(baseUrl);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
@ReactMethod
|
|
104
|
+
public void skipAppConfigAndSetBaseUrl(final String baseUrl) {
|
|
105
|
+
Netmera.skipAppConfigAndSetBaseUrl(baseUrl);
|
|
106
|
+
}
|
|
107
|
+
|
|
103
108
|
@ReactMethod(isBlockingSynchronousMethod = true)
|
|
104
109
|
public Boolean areNotificationsEnabled() {
|
|
105
110
|
return Netmera.areNotificationsEnabled();
|
package/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Netmera from "./src/Netmera";
|
|
2
|
+
import NetmeraCouponObject from "./src/models/NetmeraCouponObject";
|
|
2
3
|
import NetmeraEvent from "./src/models/NetmeraEvent";
|
|
3
4
|
import NetmeraUser, {
|
|
4
5
|
NMUserGender,
|
|
@@ -14,6 +15,7 @@ import { NMInboxStatus } from "./src/models/NMInboxStatus";
|
|
|
14
15
|
|
|
15
16
|
export {
|
|
16
17
|
Netmera,
|
|
18
|
+
NetmeraCouponObject,
|
|
17
19
|
NetmeraEvent,
|
|
18
20
|
NetmeraUser,
|
|
19
21
|
NMUserGender,
|
package/ios/RNNetmera.m
CHANGED
|
@@ -55,7 +55,7 @@ NSString *const ERROR_MESSAGE_UPDATE_USER = @"Error occurred while updating user
|
|
|
55
55
|
|
|
56
56
|
+ (void)setNetmeraHeaders {
|
|
57
57
|
[Netmera setFramework:@"react"];
|
|
58
|
-
[Netmera setFrameworkVersion:@"1.7.
|
|
58
|
+
[Netmera setFrameworkVersion:@"1.7.2"];
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
+ (void)setPushDelegate:(NSObject<NetmeraPushDelegate> *)delegate {
|
package/package.json
CHANGED
package/src/Netmera.ts
CHANGED
|
@@ -109,6 +109,12 @@ export default class Netmera {
|
|
|
109
109
|
RNNetmera.setBaseUrl(baseUrl);
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
+
static skipAppConfigAndSetBaseUrl = (baseUrl: string) => {
|
|
113
|
+
if (isAndroid()) {
|
|
114
|
+
RNNetmera.skipAppConfigAndSetBaseUrl(baseUrl);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
|
|
112
118
|
static areNotificationsEnabled = async (): Promise<boolean> => {
|
|
113
119
|
return RNNetmera.areNotificationsEnabled();
|
|
114
120
|
};
|
|
@@ -285,10 +291,11 @@ export default class Netmera {
|
|
|
285
291
|
}
|
|
286
292
|
|
|
287
293
|
static getInitialURL = async () => {
|
|
288
|
-
|
|
294
|
+
const initialUrl = await Linking.getInitialURL();
|
|
295
|
+
if (initialUrl != null) {
|
|
296
|
+
return initialUrl;
|
|
297
|
+
} else if (isIos()) {
|
|
289
298
|
return RNNetmera.getInitialURL();
|
|
290
|
-
} else {
|
|
291
|
-
return Linking.getInitialURL();
|
|
292
299
|
}
|
|
293
300
|
};
|
|
294
301
|
}
|