react-native-insider 5.1.0 → 5.2.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/.github/workflows/git-leak.yml +16 -3
- package/.github/workflows/react-native-insider_release.yml +5 -3
- package/.github/workflows/release_version_setter.yml +2 -0
- package/RNInsider.podspec +2 -2
- package/android/build.gradle +7 -12
- package/android/src/main/java/com/useinsider/react/RNInsiderModule.java +15 -4
- package/index.js +35 -0
- package/ios/RNInsider/RNInsider.h +2 -0
- package/ios/RNInsider/RNInsider.m +36 -0
- package/package.json +1 -1
- package/slack_notifier.sh +1 -0
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
name: gitleaks
|
|
2
2
|
on: [push]
|
|
3
|
+
env:
|
|
4
|
+
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
|
|
3
5
|
|
|
4
6
|
jobs:
|
|
5
7
|
gitleaks:
|
|
6
|
-
runs-on: self-
|
|
8
|
+
runs-on: self-runner-node
|
|
7
9
|
steps:
|
|
8
|
-
-
|
|
10
|
+
- name: Checkout Repository
|
|
11
|
+
uses: actions/checkout@v3
|
|
9
12
|
with:
|
|
10
13
|
fetch-depth: '2'
|
|
14
|
+
- name: Clone GitLeak Action
|
|
15
|
+
uses: actions/checkout@v3
|
|
16
|
+
with:
|
|
17
|
+
repository: useinsider/gitleaks-action
|
|
18
|
+
ref: master
|
|
19
|
+
token: ${{ secrets.PAT }}
|
|
20
|
+
path: .github/actions/gitleaks-action
|
|
21
|
+
- name: Install Dependencies
|
|
22
|
+
run: npm install
|
|
23
|
+
working-directory: .github/actions/gitleaks-action
|
|
11
24
|
- name: gitleaks-action
|
|
12
|
-
uses:
|
|
25
|
+
uses: ./.github/actions/gitleaks-action
|
|
@@ -20,7 +20,7 @@ jobs:
|
|
|
20
20
|
ref: develop
|
|
21
21
|
|
|
22
22
|
- name: Setup node
|
|
23
|
-
uses: actions/setup-node@v3.
|
|
23
|
+
uses: actions/setup-node@v3.3.0
|
|
24
24
|
with:
|
|
25
25
|
node-version: 12
|
|
26
26
|
registry-url: https://registry.npmjs.org/
|
|
@@ -34,6 +34,7 @@ jobs:
|
|
|
34
34
|
./slack_notifier.sh mob-deployment mob-sdk-releaser "$text"
|
|
35
35
|
env:
|
|
36
36
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
37
|
+
SLACK_NOTIFIER_AUTH_KEY: ${{ secrets.SLACK_NOTIFIER_AUTH_KEY }}
|
|
37
38
|
|
|
38
39
|
release-nh:
|
|
39
40
|
needs: release
|
|
@@ -47,7 +48,7 @@ jobs:
|
|
|
47
48
|
ref: develop-nh
|
|
48
49
|
|
|
49
50
|
- name: Setup node
|
|
50
|
-
uses: actions/setup-node@v3.
|
|
51
|
+
uses: actions/setup-node@v3.3.0
|
|
51
52
|
with:
|
|
52
53
|
node-version: 12
|
|
53
54
|
registry-url: https://registry.npmjs.org/
|
|
@@ -60,4 +61,5 @@ jobs:
|
|
|
60
61
|
text=":atom_symbol: React Native NH SDK is published with version: ${{ github.event.inputs.version_name }}-nh"
|
|
61
62
|
./slack_notifier.sh mob-deployment mob-sdk-releaser "$text"
|
|
62
63
|
env:
|
|
63
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
64
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
65
|
+
SLACK_NOTIFIER_AUTH_KEY: ${{ secrets.SLACK_NOTIFIER_AUTH_KEY }}
|
|
@@ -39,3 +39,5 @@ jobs:
|
|
|
39
39
|
run: |
|
|
40
40
|
text=":tatakae: React Native SDK is ready to test with version: ${{ github.event.client_payload.sdk_version_name }} <!subteam^SUUGFQNVA|mobileqa>"
|
|
41
41
|
./slack_notifier.sh mob-deployment mob-sdk-releaser "$text"
|
|
42
|
+
env:
|
|
43
|
+
SLACK_NOTIFIER_AUTH_KEY: ${{ secrets.SLACK_NOTIFIER_AUTH_KEY }}
|
package/RNInsider.podspec
CHANGED
|
@@ -9,11 +9,11 @@ Pod::Spec.new do |s|
|
|
|
9
9
|
s.authors = package_json['author']
|
|
10
10
|
s.license = 'MIT'
|
|
11
11
|
s.platform = :ios, '10.0'
|
|
12
|
-
s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/12.
|
|
12
|
+
s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/12.5.0/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', '12.
|
|
17
|
+
s.dependency 'InsiderMobile', '12.5.0'
|
|
18
18
|
s.dependency 'InsiderHybrid', '1.1.2'
|
|
19
19
|
end
|
package/android/build.gradle
CHANGED
|
@@ -27,25 +27,20 @@ android {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
repositories {
|
|
31
|
+
mavenCentral()
|
|
32
|
+
maven { url "https://maven.google.com" }
|
|
33
|
+
}
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
dependencies {
|
|
37
37
|
implementation "com.facebook.react:react-native:${getVersionFromPartner('reactNativeVersion', '+')}"
|
|
38
|
-
implementation ('com.useinsider:insider:13.
|
|
39
|
-
implementation ('com.useinsider:insiderhybrid:1.1.
|
|
38
|
+
implementation ('com.useinsider:insider:13.4.0-nh')
|
|
39
|
+
implementation ('com.useinsider:insiderhybrid:1.1.4')
|
|
40
40
|
|
|
41
41
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
42
42
|
implementation 'com.google.android.gms:play-services-location:20.0.0'
|
|
43
43
|
implementation 'com.google.android.gms:play-services-ads:21.0.0'
|
|
44
44
|
implementation 'com.google.firebase:firebase-messaging:23.0.5'
|
|
45
45
|
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.3.0.300'
|
|
50
|
-
|
|
51
|
-
}
|
|
46
|
+
}
|
|
@@ -601,10 +601,6 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
601
601
|
}
|
|
602
602
|
String provider = Insider.Instance.getCurrentProvider(reactContext);
|
|
603
603
|
switch (provider) {
|
|
604
|
-
case "huawei":
|
|
605
|
-
com.huawei.hms.push.RemoteMessage hmsRemoteMessage = new com.huawei.hms.push.RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
|
|
606
|
-
Insider.Instance.handleHMSNotification(reactContext, hmsRemoteMessage);
|
|
607
|
-
break;
|
|
608
604
|
case "other":
|
|
609
605
|
case "google":
|
|
610
606
|
RemoteMessage fcmRemoteMessage = new RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
|
|
@@ -702,4 +698,19 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
702
698
|
}
|
|
703
699
|
});
|
|
704
700
|
}
|
|
701
|
+
|
|
702
|
+
@ReactMethod
|
|
703
|
+
public void signUpConfirmation() {
|
|
704
|
+
try {
|
|
705
|
+
Insider.Instance.signUpConfirmation();
|
|
706
|
+
} catch (Exception e) {
|
|
707
|
+
Insider.Instance.putException(e);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
@ReactMethod
|
|
712
|
+
public void setActiveForegroundPushView() {}
|
|
713
|
+
|
|
714
|
+
@ReactMethod
|
|
715
|
+
public void setForegroundPushCallback() {}
|
|
705
716
|
}
|
package/index.js
CHANGED
|
@@ -16,6 +16,7 @@ const INAPP_BUTTON_CLICK = 'INAPP_BUTTON_CLICK';
|
|
|
16
16
|
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
|
+
const FOREGROUND_PUSH = 'FOREGROUND_PUSH';
|
|
19
20
|
|
|
20
21
|
function shouldNotProceed() {
|
|
21
22
|
return Insider == null;
|
|
@@ -369,4 +370,38 @@ export default class RNInsider {
|
|
|
369
370
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
370
371
|
}
|
|
371
372
|
}
|
|
373
|
+
|
|
374
|
+
static signUpConfirmation() {
|
|
375
|
+
if (shouldNotProceed()) return;
|
|
376
|
+
|
|
377
|
+
try {
|
|
378
|
+
Insider.signUpConfirmation();
|
|
379
|
+
} catch (error) {
|
|
380
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
static setForegroundPushCallback (callback) {
|
|
385
|
+
if (shouldNotProceed()) return;
|
|
386
|
+
|
|
387
|
+
try {
|
|
388
|
+
Insider.setForegroundPushCallback();
|
|
389
|
+
|
|
390
|
+
eventHandler.addListener(FOREGROUND_PUSH, notification => {
|
|
391
|
+
callback(notification);
|
|
392
|
+
});
|
|
393
|
+
} catch (error) {
|
|
394
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
static setActiveForegroundPushView() {
|
|
399
|
+
if (shouldNotProceed()) return;
|
|
400
|
+
|
|
401
|
+
try {
|
|
402
|
+
Insider.setActiveForegroundPushView();
|
|
403
|
+
} catch (error) {
|
|
404
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
405
|
+
}
|
|
406
|
+
}
|
|
372
407
|
}
|
|
@@ -276,6 +276,14 @@ RCT_EXPORT_METHOD(setGDPRConsent:(BOOL)gdprConsent) {
|
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
+
RCT_EXPORT_METHOD(signUpConfirmation) {
|
|
280
|
+
@try {
|
|
281
|
+
[Insider signUpConfirmation];
|
|
282
|
+
} @catch (NSException *e){
|
|
283
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
279
287
|
// Insider Product
|
|
280
288
|
RCT_EXPORT_METHOD(itemPurchased:(NSString *)saleID productMustMap:(NSDictionary *)productMustMap productOptMap:(NSDictionary *)productOptMap) {
|
|
281
289
|
@try {
|
|
@@ -492,6 +500,34 @@ RCT_EXPORT_METHOD(enableCarrierCollection:(BOOL)enabled) {
|
|
|
492
500
|
}
|
|
493
501
|
}
|
|
494
502
|
|
|
503
|
+
RCT_EXPORT_METHOD(setForegroundPushCallback) {
|
|
504
|
+
@try {
|
|
505
|
+
[Insider setForegroundPushCallback:@selector(foregroundPushCallback:) sender:self];
|
|
506
|
+
} @catch (NSException *e){
|
|
507
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
RCT_EXPORT_METHOD(setActiveForegroundPushView) {
|
|
512
|
+
@try {
|
|
513
|
+
[Insider setActiveForegroundPushView];
|
|
514
|
+
} @catch (NSException *e){
|
|
515
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
-(void)foregroundPushCallback:(UNNotification *) notification {
|
|
520
|
+
@try {
|
|
521
|
+
if (notification == nil) return;
|
|
522
|
+
|
|
523
|
+
RNNotificationHandler *handler = [[RNNotificationHandler alloc] init];
|
|
524
|
+
|
|
525
|
+
[handler sendDataToJS:@"FOREGROUND_PUSH" data:notification.request.content.userInfo];
|
|
526
|
+
} @catch (NSException *e){
|
|
527
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
|
|
495
531
|
-(void)emitEvent:(NSDictionary *)evetData {
|
|
496
532
|
@try {
|
|
497
533
|
RNNotificationHandler *handler = [[RNNotificationHandler alloc] init];
|
package/package.json
CHANGED