react-native-insider 6.5.2 → 6.6.0-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 CHANGED
@@ -9,12 +9,12 @@ Pod::Spec.new do |s|
9
9
  s.authors = package_json['author']
10
10
  s.license = 'MIT'
11
11
  s.platform = :ios, '12.0'
12
- s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/13.6.3/InsiderMobileIOSFramework.zip'}
12
+ s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/13.7.1/InsiderMobileIOSFramework.zip'}
13
13
  s.source_files = 'ios/RNInsider/*.{h,m}'
14
14
  s.requires_arc = true
15
15
  s.static_framework = true
16
16
  s.dependency 'React'
17
- s.dependency 'InsiderMobile', '13.6.3'
17
+ s.dependency 'InsiderMobile', '13.7.1'
18
18
  s.dependency 'InsiderGeofence', '1.2.0'
19
19
  s.dependency 'InsiderHybrid', '1.5.0'
20
20
  end
@@ -35,7 +35,7 @@ repositories {
35
35
 
36
36
  dependencies {
37
37
  implementation "com.facebook.react:react-native:${getVersionFromPartner('reactNativeVersion', '+')}"
38
- implementation ('com.useinsider:insider:14.4.0')
38
+ implementation ('com.useinsider:insider:14.5.0-nh')
39
39
  implementation ('com.useinsider:insiderhybrid:1.1.5')
40
40
 
41
41
  implementation 'androidx.security:security-crypto:1.1.0-alpha06'
@@ -45,8 +45,4 @@ dependencies {
45
45
  implementation 'com.google.firebase:firebase-messaging:24.0.0'
46
46
  implementation 'com.google.android.gms:play-services-location:21.3.0'
47
47
  implementation 'com.google.android.play:review:2.0.1'
48
-
49
- implementation 'com.huawei.hms:push:6.12.0.300'
50
- implementation 'com.huawei.hms:ads-identifier:3.4.62.300'
51
- implementation 'com.huawei.hms:location:6.11.0.301'
52
48
  }
@@ -656,10 +656,6 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
656
656
  }
657
657
  String provider = Insider.Instance.getCurrentProvider(reactContext);
658
658
  switch (provider) {
659
- case "huawei":
660
- com.huawei.hms.push.RemoteMessage hmsRemoteMessage = new com.huawei.hms.push.RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
661
- Insider.Instance.handleHMSNotification(reactContext, hmsRemoteMessage);
662
- break;
663
659
  case "other":
664
660
  case "google":
665
661
  RemoteMessage fcmRemoteMessage = new RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
@@ -814,4 +810,22 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
814
810
  Insider.Instance.putException(e);
815
811
  }
816
812
  }
813
+
814
+ @ReactMethod
815
+ public void disableInAppMessages() {
816
+ try {
817
+ Insider.Instance.disableInAppMessages();
818
+ } catch (Exception e) {
819
+ Insider.Instance.putException(e);
820
+ }
821
+ }
822
+
823
+ @ReactMethod
824
+ public void enableInAppMessages() {
825
+ try {
826
+ Insider.Instance.enableInAppMessages();
827
+ } catch (Exception e) {
828
+ Insider.Instance.putException(e);
829
+ }
830
+ }
817
831
  }
package/index.d.ts CHANGED
@@ -89,6 +89,8 @@ declare module 'react-native-insider' {
89
89
  static handleUniversalLink(url: string): void;
90
90
  static getInsiderID(): Promise<string>;
91
91
  static insiderIDListener(callback: (insiderID: string) => void): void;
92
+ static disableInAppMessages(): void;
93
+ static enableInAppMessages(): void;
92
94
  }
93
95
 
94
96
  export const NOTIFICATION_OPEN: string;
package/index.js CHANGED
@@ -482,4 +482,24 @@ export default class RNInsider {
482
482
  Insider.putErrorLog(generateJSONErrorString(error));
483
483
  }
484
484
  }
485
+
486
+ static disableInAppMessages() {
487
+ try {
488
+ if (shouldNotProceed()) return;
489
+
490
+ return Insider.disableInAppMessages();
491
+ } catch (error) {
492
+ Insider.putErrorLog(generateJSONErrorString(error));
493
+ }
494
+ }
495
+
496
+ static enableInAppMessages() {
497
+ try {
498
+ if (shouldNotProceed()) return;
499
+
500
+ return Insider.disableInAppMessages();
501
+ } catch (error) {
502
+ Insider.putErrorLog(generateJSONErrorString(error));
503
+ }
504
+ }
485
505
  }
@@ -592,6 +592,22 @@ RCT_EXPORT_METHOD(registerInsiderIDListener) {
592
592
  }
593
593
  }
594
594
 
595
+ RCT_EXPORT_METHOD(disableInAppMessages) {
596
+ @try {
597
+ [Insider disableInAppMessages];
598
+ } @catch (NSException *e){
599
+ [Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
600
+ }
601
+ }
602
+
603
+ RCT_EXPORT_METHOD(enableInAppMessages) {
604
+ @try {
605
+ [Insider enableInAppMessages];
606
+ } @catch (NSException *e){
607
+ [Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
608
+ }
609
+ }
610
+
595
611
  -(void)insiderIDChangeListener:(NSString *) insiderID {
596
612
  @try {
597
613
  if (insiderID == nil) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-insider",
3
- "version": "6.5.2",
3
+ "version": "6.6.0-nh",
4
4
  "description": "React Native Insider SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",