react-native-insider 5.5.2 → 5.5.3-nh
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/RNInsider.podspec +1 -1
- package/android/build.gradle +3 -5
- package/android/src/main/AndroidManifest.xml +3 -2
- package/android/src/main/java/com/useinsider/react/RNInsiderModule.java +0 -4
- package/index.js +2 -1
- package/ios/RNInsider/RNInsider.m +3 -0
- package/ios/RNInsider/RNNotificationHandler.h +1 -0
- package/ios/RNInsider/RNNotificationHandler.m +2 -1
- package/package.json +1 -1
- package/src/InsiderCallbackType.js +2 -1
package/RNInsider.podspec
CHANGED
|
@@ -14,7 +14,7 @@ Pod::Spec.new do |s|
|
|
|
14
14
|
s.requires_arc = true
|
|
15
15
|
s.static_framework = true
|
|
16
16
|
s.dependency 'React'
|
|
17
|
-
s.dependency 'InsiderMobile', '12.8.
|
|
17
|
+
s.dependency 'InsiderMobile', '12.8.6'
|
|
18
18
|
s.dependency 'InsiderGeofence', '1.0.3'
|
|
19
19
|
s.dependency 'InsiderHybrid', '1.4.0'
|
|
20
20
|
end
|
package/android/build.gradle
CHANGED
|
@@ -35,16 +35,14 @@ repositories {
|
|
|
35
35
|
|
|
36
36
|
dependencies {
|
|
37
37
|
implementation "com.facebook.react:react-native:${getVersionFromPartner('reactNativeVersion', '+')}"
|
|
38
|
-
implementation ('com.useinsider:insider:13.8.
|
|
38
|
+
implementation ('com.useinsider:insider:13.8.5-nh')
|
|
39
39
|
implementation ('com.useinsider:insiderhybrid:1.1.5')
|
|
40
40
|
|
|
41
|
+
implementation "androidx.security:security-crypto:1.0.0"
|
|
42
|
+
|
|
41
43
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
42
44
|
implementation 'com.google.android.gms:play-services-location:20.0.0'
|
|
43
45
|
implementation 'com.google.android.gms:play-services-ads:21.0.0'
|
|
44
46
|
implementation 'com.google.firebase:firebase-messaging:23.0.5'
|
|
45
47
|
implementation 'androidx.lifecycle:lifecycle-process:2.4.1'
|
|
46
|
-
|
|
47
|
-
implementation 'com.huawei.hms:push:6.5.0.300'
|
|
48
|
-
implementation 'com.huawei.hms:ads-identifier:3.4.39.302'
|
|
49
|
-
implementation 'com.huawei.hms:location:6.4.0.300'
|
|
50
48
|
}
|
|
@@ -621,10 +621,6 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
621
621
|
}
|
|
622
622
|
String provider = Insider.Instance.getCurrentProvider(reactContext);
|
|
623
623
|
switch (provider) {
|
|
624
|
-
case "huawei":
|
|
625
|
-
com.huawei.hms.push.RemoteMessage hmsRemoteMessage = new com.huawei.hms.push.RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
|
|
626
|
-
Insider.Instance.handleHMSNotification(reactContext, hmsRemoteMessage);
|
|
627
|
-
break;
|
|
628
624
|
case "other":
|
|
629
625
|
case "google":
|
|
630
626
|
RemoteMessage fcmRemoteMessage = new RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
|
package/index.js
CHANGED
|
@@ -17,6 +17,7 @@ const TEMP_STORE_PURCHASE = 'TEMP_STORE_PURCHASE';
|
|
|
17
17
|
const TEMP_STORE_ADDED_TO_CART = 'TEMP_STORE_ADDED_TO_CART';
|
|
18
18
|
const TEMP_STORE_CUSTOM_ACTION = 'TEMP_STORE_CUSTOM_ACTION';
|
|
19
19
|
const FOREGROUND_PUSH = 'FOREGROUND_PUSH';
|
|
20
|
+
const INAPP_SEEN = 'INAPP_SEEN';
|
|
20
21
|
|
|
21
22
|
function shouldNotProceed() {
|
|
22
23
|
return Insider == null;
|
|
@@ -28,7 +29,7 @@ function generateJSONErrorString(error) {
|
|
|
28
29
|
|
|
29
30
|
function registerInsiderCallback(insiderCallback) {
|
|
30
31
|
try {
|
|
31
|
-
const callbackActions = [NOTIFICATION_OPEN, INAPP_BUTTON_CLICK, TEMP_STORE_PURCHASE, TEMP_STORE_ADDED_TO_CART, TEMP_STORE_CUSTOM_ACTION];
|
|
32
|
+
const callbackActions = [NOTIFICATION_OPEN, INAPP_BUTTON_CLICK, TEMP_STORE_PURCHASE, TEMP_STORE_ADDED_TO_CART, TEMP_STORE_CUSTOM_ACTION, INAPP_SEEN];
|
|
32
33
|
callbackActions.forEach((callbackAction, index) => {
|
|
33
34
|
eventHandler.addListener(callbackAction, notification => {
|
|
34
35
|
insiderCallback(index, notification);
|
|
@@ -568,6 +568,9 @@ RCT_EXPORT_METHOD(setActiveForegroundPushView) {
|
|
|
568
568
|
case InsiderCallbackTypeTempStoreCustomAction:
|
|
569
569
|
[handler sendDataToJS:TEMP_STORE_CUSTOM_ACTION data:evetData];
|
|
570
570
|
break;
|
|
571
|
+
case InsiderCallbackTypeInAppSeen:
|
|
572
|
+
[handler sendDataToJS:INAPP_SEEN data:evetData];
|
|
573
|
+
break;
|
|
571
574
|
default:
|
|
572
575
|
break;
|
|
573
576
|
}
|
|
@@ -20,5 +20,6 @@ extern NSString * const INAPP_BUTTON_CLICK;
|
|
|
20
20
|
extern NSString * const TEMP_STORE_PURCHASE;
|
|
21
21
|
extern NSString * const TEMP_STORE_ADDED_TO_CART;
|
|
22
22
|
extern NSString * const TEMP_STORE_CUSTOM_ACTION;
|
|
23
|
+
extern NSString * const INAPP_SEEN;
|
|
23
24
|
-(void)sendDataToJS:(NSString *)eventName data:(NSDictionary *)data;
|
|
24
25
|
@end
|
|
@@ -20,6 +20,7 @@ NSString * const INAPP_BUTTON_CLICK = @"INAPP_BUTTON_CLICK";
|
|
|
20
20
|
NSString * const TEMP_STORE_PURCHASE = @"TEMP_STORE_PURCHASE";
|
|
21
21
|
NSString * const TEMP_STORE_ADDED_TO_CART = @"TEMP_STORE_ADDED_TO_CART";
|
|
22
22
|
NSString * const TEMP_STORE_CUSTOM_ACTION = @"TEMP_STORE_CUSTOM_ACTION";
|
|
23
|
+
NSString * const INAPP_SEEN = @"INAPP_SEEN";
|
|
23
24
|
|
|
24
25
|
static RNNotificationHandler *notificationHandler;
|
|
25
26
|
|
|
@@ -38,7 +39,7 @@ static RNNotificationHandler *notificationHandler;
|
|
|
38
39
|
RCT_EXPORT_MODULE();
|
|
39
40
|
|
|
40
41
|
-(NSArray<NSString *> *)supportedEvents{
|
|
41
|
-
return @[NOTIFICATION_OPEN, INAPP_BUTTON_CLICK, TEMP_STORE_PURCHASE, TEMP_STORE_ADDED_TO_CART, TEMP_STORE_CUSTOM_ACTION];
|
|
42
|
+
return @[NOTIFICATION_OPEN, INAPP_BUTTON_CLICK, TEMP_STORE_PURCHASE, TEMP_STORE_ADDED_TO_CART, TEMP_STORE_CUSTOM_ACTION, INAPP_SEEN];
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
-(void)sendDataToJS:(NSString *)eventName data:(NSDictionary *)data {
|
package/package.json
CHANGED