cordova-plugin-insider 1.8.0 → 1.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-plugin-insider",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "A plugin that you can use Insider SDK with Cordova and Ionic",
5
5
  "cordova_name": "Insider Cordova Plugin",
6
6
  "cordova": {
package/plugin.xml CHANGED
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <plugin id="cordova-plugin-insider" version="1.8.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
2
+ <plugin id="cordova-plugin-insider" version="1.9.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.2.2" />
73
+ <pod name="InsiderMobile" spec="13.3.1" />
74
74
  <pod name="InsiderGeofence" spec="1.1.0" />
75
75
  <pod name="InsiderHybrid" spec="1.4.0" />
76
76
  </pods>
@@ -637,6 +637,8 @@ public class InsiderPlugin extends CordovaPlugin {
637
637
  return true;
638
638
  } else if (action.equals("signUpConfirmation")) {
639
639
  Insider.Instance.signUpConfirmation();
640
+ } else if (action.equals("setPushToken")) {
641
+ Insider.Instance.setPushToken(args.getString(0));
640
642
  } else {
641
643
  return false;
642
644
  }
@@ -16,7 +16,7 @@ android {
16
16
  }
17
17
 
18
18
  dependencies {
19
- implementation 'com.useinsider:insider:14.1.1'
19
+ implementation 'com.useinsider:insider:14.1.2'
20
20
  implementation 'com.useinsider:insiderhybrid:1.1.6'
21
21
 
22
22
  implementation 'com.fasterxml.jackson.core:jackson-core:2.12.4'
@@ -33,7 +33,7 @@ interface InsiderPlugin {
33
33
  enableIDFACollection(idfaCollection: boolean): void;
34
34
  removeInapp(): void;
35
35
  registerWithQuietPermission(booleanValue: boolean): void;
36
- setHybridPushToken(token: string): void;
36
+ setPushToken(token: string): void;
37
37
  enableLocationCollection(locationCollection: boolean): void;
38
38
  enableIpCollection(ipCollection: boolean): void;
39
39
  enableCarrierCollection(carrierCollection: boolean): void;
package/www/Constants.js CHANGED
@@ -55,7 +55,7 @@ module.exports = {
55
55
  SET_GDPR_CONSENT: 'setGDPRConsent',
56
56
  REMOVE_IN_APP: 'removeInapp',
57
57
  REGISTER_WITH_QUIET_PERMISSION: 'registerWithQuietPermission',
58
- SET_HYBRID_PUSH_TOKEN: 'setHybridPushToken',
58
+ SET_HYBRID_PUSH_TOKEN: 'setPushToken',
59
59
  ENABLE_IDFA_COLLECTION: 'enableIDFACollection',
60
60
  ENABLE_LOCATION_COLLECTION: 'enableLocationCollection',
61
61
  ENABLE_IP_COLLECTION: 'enableIpCollection',
@@ -86,5 +86,5 @@ module.exports = {
86
86
  // Reinit
87
87
  REINIT_WITH_PARTNER_NAME: 'reinitWithPartnerName',
88
88
  // SDK Version
89
- SDK_VERSION: 'CDV-1.8.0',
89
+ SDK_VERSION: 'CDV-1.9.0',
90
90
  };
@@ -410,14 +410,14 @@ class InsiderPlugin {
410
410
  }
411
411
  };
412
412
 
413
- setHybridPushToken = (token) => {
413
+ setPushToken = (token) => {
414
414
  if (Utils.checkParameters([{ type: 'string', value: token }])) {
415
- Utils.showParameterWarningLog(this.constructor.name + '-setHybridPushToken');
415
+ Utils.showParameterWarningLog(this.constructor.name + '-setPushToken');
416
416
  return;
417
417
  }
418
418
 
419
419
  try {
420
- if (Platform.OS !== InsiderConstants.ANDROID) return;
420
+ if (cordova.platformId !== InsiderConstants.ANDROID) return;
421
421
 
422
422
  Utils.asyncExec(InsiderConstants.CLASS, InsiderConstants.SET_HYBRID_PUSH_TOKEN, [token]);
423
423
  } catch (error) {