cordova-plugin-insider 1.9.0 → 2.0.0
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/SECURITY.MD +7 -0
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/src/android/InsiderPlugin.java +10 -0
- package/src/android/build-extras.gradle +4 -4
- package/src/ios/InsiderPlugin.h +2 -0
- package/src/ios/InsiderPlugin.m +22 -5
- package/www/Constants.js +1 -1
package/SECURITY.MD
ADDED
package/package.json
CHANGED
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="cordova-plugin-insider" version="
|
|
2
|
+
<plugin id="cordova-plugin-insider" version="2.0.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
3
|
<name>Insider</name>
|
|
4
4
|
<description>Insider Cordova Plugin</description>
|
|
5
5
|
<keywords>insider,cordova,cordova-ios,cordova-android</keywords>
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
<source url="https://cdn.cocoapods.org/" />
|
|
71
71
|
</config>
|
|
72
72
|
<pods use-frameworks="true">
|
|
73
|
-
<pod name="InsiderMobile" spec="13.
|
|
73
|
+
<pod name="InsiderMobile" spec="13.4.0" />
|
|
74
74
|
<pod name="InsiderGeofence" spec="1.1.0" />
|
|
75
75
|
<pod name="InsiderHybrid" spec="1.4.0" />
|
|
76
76
|
</pods>
|
|
@@ -639,6 +639,16 @@ public class InsiderPlugin extends CordovaPlugin {
|
|
|
639
639
|
Insider.Instance.signUpConfirmation();
|
|
640
640
|
} else if (action.equals("setPushToken")) {
|
|
641
641
|
Insider.Instance.setPushToken(args.getString(0));
|
|
642
|
+
} else if (action.equals("setEmail")) {
|
|
643
|
+
if (args.get(0) == null)
|
|
644
|
+
return false;
|
|
645
|
+
|
|
646
|
+
Insider.Instance.getCurrentUser().setEmail(args.getString(0));
|
|
647
|
+
} else if (action.equals("setPhoneNumber")) {
|
|
648
|
+
if (args.get(0) == null)
|
|
649
|
+
return false;
|
|
650
|
+
|
|
651
|
+
Insider.Instance.getCurrentUser().setPhoneNumber(args.getString(0));
|
|
642
652
|
} else {
|
|
643
653
|
return false;
|
|
644
654
|
}
|
|
@@ -16,7 +16,7 @@ android {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
dependencies {
|
|
19
|
-
implementation 'com.useinsider:insider:14.
|
|
19
|
+
implementation 'com.useinsider:insider:14.2.2'
|
|
20
20
|
implementation 'com.useinsider:insiderhybrid:1.1.6'
|
|
21
21
|
|
|
22
22
|
implementation 'com.fasterxml.jackson.core:jackson-core:2.12.4'
|
|
@@ -27,11 +27,11 @@ dependencies {
|
|
|
27
27
|
|
|
28
28
|
implementation 'com.google.android.gms:play-services-location:21.0.1'
|
|
29
29
|
implementation 'com.google.firebase:firebase-messaging:23.0.5'
|
|
30
|
-
implementation 'com.google.android.play:
|
|
30
|
+
implementation 'com.google.android.play:review:2.0.1'
|
|
31
31
|
|
|
32
32
|
implementation 'com.huawei.hms:push:6.5.0.300'
|
|
33
33
|
implementation 'com.huawei.hms:ads-identifier:3.4.39.302'
|
|
34
34
|
implementation 'com.huawei.hms:location:6.4.0.300'
|
|
35
|
-
|
|
36
|
-
implementation 'androidx.security:security-crypto:1.
|
|
35
|
+
|
|
36
|
+
implementation 'androidx.security:security-crypto:1.1.0-alpha06'
|
|
37
37
|
}
|
package/src/ios/InsiderPlugin.h
CHANGED
|
@@ -40,7 +40,9 @@
|
|
|
40
40
|
- (void) setAge:(CDVInvokedUrlCommand *)command;
|
|
41
41
|
- (void) setSMSOptin:(CDVInvokedUrlCommand *)command;
|
|
42
42
|
- (void) setEmailOptin:(CDVInvokedUrlCommand *)command;
|
|
43
|
+
- (void) setEmail:(CDVInvokedUrlCommand *)command;
|
|
43
44
|
- (void) setPushOptin:(CDVInvokedUrlCommand *)command;
|
|
45
|
+
- (void) setPhoneNumber:(CDVInvokedUrlCommand *)command;
|
|
44
46
|
- (void) setLocationOptin:(CDVInvokedUrlCommand *)command;
|
|
45
47
|
- (void) setWhatsappOptin:(CDVInvokedUrlCommand *)command;
|
|
46
48
|
- (void) setLocale:(CDVInvokedUrlCommand *)command;
|
package/src/ios/InsiderPlugin.m
CHANGED
|
@@ -507,6 +507,16 @@
|
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
+
- (void)setPhoneNumber:(CDVInvokedUrlCommand *)command {
|
|
511
|
+
@try {
|
|
512
|
+
if (![command.arguments objectAtIndex:0]) return;
|
|
513
|
+
|
|
514
|
+
[Insider getCurrentUser].setPhoneNumber([command.arguments objectAtIndex:0]);
|
|
515
|
+
} @catch (NSException *e) {
|
|
516
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
510
520
|
- (void)setEmailOptin:(CDVInvokedUrlCommand *)command {
|
|
511
521
|
@try {
|
|
512
522
|
if (![command.arguments objectAtIndex:0]) return;
|
|
@@ -516,6 +526,16 @@
|
|
|
516
526
|
}
|
|
517
527
|
}
|
|
518
528
|
|
|
529
|
+
- (void)setEmail:(CDVInvokedUrlCommand *)command {
|
|
530
|
+
@try {
|
|
531
|
+
if (![command.arguments objectAtIndex:0]) return;
|
|
532
|
+
|
|
533
|
+
[Insider getCurrentUser].setEmail([command.arguments objectAtIndex:0]);
|
|
534
|
+
} @catch (NSException *e) {
|
|
535
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
|
|
519
539
|
- (void)setPushOptin:(CDVInvokedUrlCommand *)command {
|
|
520
540
|
@try {
|
|
521
541
|
if (![command.arguments objectAtIndex:0]) return;
|
|
@@ -674,12 +694,9 @@
|
|
|
674
694
|
[[Insider getCurrentUser] login:insiderIdentifiers insiderIDResult:^(NSString *insiderID) {
|
|
675
695
|
[self sendSuccessResultWithString:insiderID andCommand:command];
|
|
676
696
|
}];
|
|
697
|
+
} else {
|
|
698
|
+
[[Insider getCurrentUser] login:insiderIdentifiers];
|
|
677
699
|
}
|
|
678
|
-
|
|
679
|
-
InsiderUser* currentUser = [Insider getCurrentUser];
|
|
680
|
-
|
|
681
|
-
[currentUser login:insiderIdentifiers];
|
|
682
|
-
|
|
683
700
|
});
|
|
684
701
|
} @catch (NSException *e) {
|
|
685
702
|
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
package/www/Constants.js
CHANGED