@purchasely/cordova-plugin-purchasely 2.2.0 → 2.2.3

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/VERSIONS.md CHANGED
@@ -18,4 +18,7 @@ This file provides the underlying native SDK versions that the Cordova SDK relie
18
18
  | 2.0.1 | 3.0.0 | 3.0.1 |
19
19
  | 2.1.0 | 3.1.0 | 3.1.0 |
20
20
  | 2.1.1 | 3.1.0 | 3.1.0 |
21
- | 2.2.0 | 3.2.0 | 3.2.0 |
21
+ | 2.2.0 | 3.2.0 | 3.2.0 |
22
+ | 2.2.1 | 3.2.1 | 3.2.1 |
23
+ | 2.2.2 | 3.2.2 | 3.2.2 |
24
+ | 2.2.3 | 3.2.3 | 3.2.2 |
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <widget id="io.purchasely.sample" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
2
+ <widget id="com.purchasely.demo" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3
3
  <name>HelloCordova</name>
4
4
  <description>
5
5
  A sample Apache Cordova application that responds to the deviceready event.
@@ -9,6 +9,7 @@
9
9
  "version": "1.0.0",
10
10
  "license": "Apache-2.0",
11
11
  "devDependencies": {
12
+ "@purchasely/cordova-plugin-purchasely": "^2.2.2",
12
13
  "cordova-android": "^10.1.0",
13
14
  "cordova-ios": "^6.2.0",
14
15
  "cordova-plugin-purchasely": "file:.."
@@ -16,7 +17,7 @@
16
17
  },
17
18
  "..": {
18
19
  "name": "cordova-plugin-purchasely",
19
- "version": "2.2.0",
20
+ "version": "2.2.3",
20
21
  "dev": true,
21
22
  "license": "ISC"
22
23
  },
@@ -66,6 +67,12 @@
66
67
  "node": ">= 8"
67
68
  }
68
69
  },
70
+ "node_modules/@purchasely/cordova-plugin-purchasely": {
71
+ "version": "2.2.2",
72
+ "resolved": "https://registry.npmjs.org/@purchasely/cordova-plugin-purchasely/-/cordova-plugin-purchasely-2.2.2.tgz",
73
+ "integrity": "sha512-0d8Bfh2RKLU2D+kMiZ75SqeT3/5C3BaTFRFi6+cTKzrZcycjRW1nhHP1lvjoHXvaDDh9bxVMVKt2uCtTtE8xig==",
74
+ "dev": true
75
+ },
69
76
  "node_modules/abbrev": {
70
77
  "version": "1.1.1",
71
78
  "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
@@ -546,13 +553,13 @@
546
553
  "node_modules/ios-sim/node_modules/bplist-parser": {
547
554
  "version": "0.0.6",
548
555
  "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz",
549
- "integrity": "sha1-ONo0cYF9+dRKs4kuJ3B7u9daEbk=",
556
+ "integrity": "sha512-fGeghPEH4Eytvf+Mi446aKcDqvkA/+eh6r7QGiZWMQG6TzqrnsToLP379XFfqRSZ41+676hhGIm++maNST1Apw==",
550
557
  "dev": true
551
558
  },
552
559
  "node_modules/ios-sim/node_modules/nopt": {
553
560
  "version": "1.0.9",
554
561
  "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz",
555
- "integrity": "sha1-O8DXy6e/sNWmdtvtfA6+SKT9RU4=",
562
+ "integrity": "sha512-CmUZ3rzN0/4kRHum5pGRiGkhmBMzgtEDxrZVHqRJDSv8qK6s+wzaig/xeyB22Due5aZQeTiEZg/nrmMH2tapDQ==",
556
563
  "dev": true,
557
564
  "dependencies": {
558
565
  "abbrev": "1"
@@ -565,9 +572,9 @@
565
572
  }
566
573
  },
567
574
  "node_modules/is-core-module": {
568
- "version": "2.8.1",
569
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz",
570
- "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==",
575
+ "version": "2.9.0",
576
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz",
577
+ "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==",
571
578
  "dev": true,
572
579
  "dependencies": {
573
580
  "has": "^1.0.3"
@@ -903,7 +910,7 @@
903
910
  "node_modules/rechoir": {
904
911
  "version": "0.6.2",
905
912
  "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
906
- "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
913
+ "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
907
914
  "dev": true,
908
915
  "dependencies": {
909
916
  "resolve": "^1.1.6"
@@ -1063,7 +1070,7 @@
1063
1070
  "node_modules/stream-buffers": {
1064
1071
  "version": "2.2.0",
1065
1072
  "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz",
1066
- "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=",
1073
+ "integrity": "sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg==",
1067
1074
  "dev": true,
1068
1075
  "engines": {
1069
1076
  "node": ">= 0.10.0"
@@ -1108,7 +1115,7 @@
1108
1115
  "node_modules/tail": {
1109
1116
  "version": "0.4.0",
1110
1117
  "resolved": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz",
1111
- "integrity": "sha1-0p3nJ1DMmdseBTr/E8NZ7PtxMAI=",
1118
+ "integrity": "sha512-i5rOhX0PwkFSbjID14mmuoqrLUIqpJeBwg0esugSbb+6Y+dzgN/O3YZXzzPL7dnQJGbQLs8cwM8Zsak5kFJGcA==",
1112
1119
  "dev": true,
1113
1120
  "engines": {
1114
1121
  "node": ">= 0.4.0"
@@ -1219,7 +1226,7 @@
1219
1226
  "node_modules/xml-escape": {
1220
1227
  "version": "1.1.0",
1221
1228
  "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz",
1222
- "integrity": "sha1-OQTBQ/qOs6ADDsZG0pAqLxtwbEQ=",
1229
+ "integrity": "sha512-B/T4sDK8Z6aUh/qNr7mjKAwwncIljFuUP+DO/D5hloYFj+90O88z8Wf7oSucZTHxBAsC1/CTP4rtx/x1Uf72Mg==",
1223
1230
  "dev": true
1224
1231
  },
1225
1232
  "node_modules/xmlbuilder": {
@@ -1276,6 +1283,12 @@
1276
1283
  "fastq": "^1.6.0"
1277
1284
  }
1278
1285
  },
1286
+ "@purchasely/cordova-plugin-purchasely": {
1287
+ "version": "2.2.2",
1288
+ "resolved": "https://registry.npmjs.org/@purchasely/cordova-plugin-purchasely/-/cordova-plugin-purchasely-2.2.2.tgz",
1289
+ "integrity": "sha512-0d8Bfh2RKLU2D+kMiZ75SqeT3/5C3BaTFRFi6+cTKzrZcycjRW1nhHP1lvjoHXvaDDh9bxVMVKt2uCtTtE8xig==",
1290
+ "dev": true
1291
+ },
1279
1292
  "abbrev": {
1280
1293
  "version": "1.1.1",
1281
1294
  "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
@@ -1661,13 +1674,13 @@
1661
1674
  "bplist-parser": {
1662
1675
  "version": "0.0.6",
1663
1676
  "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz",
1664
- "integrity": "sha1-ONo0cYF9+dRKs4kuJ3B7u9daEbk=",
1677
+ "integrity": "sha512-fGeghPEH4Eytvf+Mi446aKcDqvkA/+eh6r7QGiZWMQG6TzqrnsToLP379XFfqRSZ41+676hhGIm++maNST1Apw==",
1665
1678
  "dev": true
1666
1679
  },
1667
1680
  "nopt": {
1668
1681
  "version": "1.0.9",
1669
1682
  "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz",
1670
- "integrity": "sha1-O8DXy6e/sNWmdtvtfA6+SKT9RU4=",
1683
+ "integrity": "sha512-CmUZ3rzN0/4kRHum5pGRiGkhmBMzgtEDxrZVHqRJDSv8qK6s+wzaig/xeyB22Due5aZQeTiEZg/nrmMH2tapDQ==",
1671
1684
  "dev": true,
1672
1685
  "requires": {
1673
1686
  "abbrev": "1"
@@ -1676,9 +1689,9 @@
1676
1689
  }
1677
1690
  },
1678
1691
  "is-core-module": {
1679
- "version": "2.8.1",
1680
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz",
1681
- "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==",
1692
+ "version": "2.9.0",
1693
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz",
1694
+ "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==",
1682
1695
  "dev": true,
1683
1696
  "requires": {
1684
1697
  "has": "^1.0.3"
@@ -1913,7 +1926,7 @@
1913
1926
  "rechoir": {
1914
1927
  "version": "0.6.2",
1915
1928
  "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
1916
- "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
1929
+ "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
1917
1930
  "dev": true,
1918
1931
  "requires": {
1919
1932
  "resolve": "^1.1.6"
@@ -2027,7 +2040,7 @@
2027
2040
  "stream-buffers": {
2028
2041
  "version": "2.2.0",
2029
2042
  "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz",
2030
- "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=",
2043
+ "integrity": "sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg==",
2031
2044
  "dev": true
2032
2045
  },
2033
2046
  "string.prototype.codepointat": {
@@ -2057,7 +2070,7 @@
2057
2070
  "tail": {
2058
2071
  "version": "0.4.0",
2059
2072
  "resolved": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz",
2060
- "integrity": "sha1-0p3nJ1DMmdseBTr/E8NZ7PtxMAI=",
2073
+ "integrity": "sha512-i5rOhX0PwkFSbjID14mmuoqrLUIqpJeBwg0esugSbb+6Y+dzgN/O3YZXzzPL7dnQJGbQLs8cwM8Zsak5kFJGcA==",
2061
2074
  "dev": true
2062
2075
  },
2063
2076
  "to-regex-range": {
@@ -2138,7 +2151,7 @@
2138
2151
  "xml-escape": {
2139
2152
  "version": "1.1.0",
2140
2153
  "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz",
2141
- "integrity": "sha1-OQTBQ/qOs6ADDsZG0pAqLxtwbEQ=",
2154
+ "integrity": "sha512-B/T4sDK8Z6aUh/qNr7mjKAwwncIljFuUP+DO/D5hloYFj+90O88z8Wf7oSucZTHxBAsC1/CTP4rtx/x1Uf72Mg==",
2142
2155
  "dev": true
2143
2156
  },
2144
2157
  "xmlbuilder": {
@@ -13,17 +13,18 @@
13
13
  "author": "Apache Cordova Team",
14
14
  "license": "Apache-2.0",
15
15
  "devDependencies": {
16
+ "@purchasely/cordova-plugin-purchasely": "^2.2.2",
16
17
  "cordova-android": "^10.1.0",
17
18
  "cordova-ios": "^6.2.0",
18
19
  "cordova-plugin-purchasely": "file:.."
19
20
  },
20
21
  "cordova": {
21
22
  "plugins": {
23
+ "@purchasely/cordova-plugin-purchasely": {},
22
24
  "cordova-plugin-purchasely": {}
23
25
  },
24
26
  "platforms": [
25
- "android",
26
- "ios"
27
+ "android"
27
28
  ]
28
29
  }
29
- }
30
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purchasely/cordova-plugin-purchasely",
3
- "version": "2.2.0",
3
+ "version": "2.2.3",
4
4
  "description": "Purchasely is a solution to ease the integration and boost your In-App Purchases & Subscriptions on the App Store, Google Play Store, Amazon Appstore and Huawei App Gallery.",
5
5
  "cordova": {
6
6
  "id": "@purchasely/cordova-plugin-purchasely",
package/plugin.xml CHANGED
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <plugin id="@purchasely/cordova-plugin-purchasely" version="2.2.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
2
+ <plugin id="@purchasely/cordova-plugin-purchasely" version="2.2.2" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
3
3
  <name>Purchasely</name>
4
4
  <js-module name="Purchasely" src="www/Purchasely.js">
5
5
  <clobbers target="Purchasely" />
@@ -28,7 +28,7 @@
28
28
  <source url="https://github.com/CocoaPods/Specs.git"/>
29
29
  </config>
30
30
  <pods use-frameworks="true">
31
- <pod name="Purchasely" spec="3.2.0"/>
31
+ <pod name="Purchasely" spec="3.2.3"/>
32
32
  </pods>
33
33
  </podspec>
34
34
  </platform>
@@ -51,7 +51,7 @@
51
51
  android:theme="@style/Theme.AppCompat.Light.NoActionBar">
52
52
  </activity>
53
53
  </config-file>
54
- <framework src="io.purchasely:core:3.2.0" />
54
+ <framework src="io.purchasely:core:3.2.1" />
55
55
  <source-file src="src/android/PurchaselyPlugin.java" target-dir="src/cordova/plugin/purchasely" />
56
56
  <source-file src="src/android/PLYProductActivity.java" target-dir="src/cordova/plugin/purchasely" />
57
57
  <source-file src="src/android/PLYSubscriptionsActivity.java" target-dir="src/cordova/plugin/purchasely" />
@@ -63,6 +63,7 @@ public class PLYProductActivity extends AppCompatActivity {
63
63
 
64
64
  PurchaselyPlugin.ProductActivity productActivity = new PurchaselyPlugin.ProductActivity();
65
65
  productActivity.presentationId = presentationId;
66
+ productActivity.placementId = placementId;
66
67
  productActivity.productId = productId;
67
68
  productActivity.planId = planId;
68
69
  productActivity.contentId = contentId;
@@ -669,6 +669,7 @@ public class PurchaselyPlugin extends CordovaPlugin {
669
669
 
670
670
  public static class ProductActivity {
671
671
  String presentationId = null;
672
+ String placementId = null;
672
673
  String productId = null;
673
674
  String planId = null;
674
675
  String contentId = null;
@@ -681,6 +682,7 @@ public class PurchaselyPlugin extends CordovaPlugin {
681
682
  && !backgroundActivity.isDestroyed()) {
682
683
  Intent intent = new Intent(cordova.getActivity(), PLYProductActivity.class);
683
684
  intent.putExtra("presentationId", presentationId);
685
+ intent.putExtra("placementId", placementId);
684
686
  intent.putExtra("productId", productId);
685
687
  intent.putExtra("planId", planId);
686
688
  intent.putExtra("contentId", contentId);
@@ -690,6 +692,7 @@ public class PurchaselyPlugin extends CordovaPlugin {
690
692
  } else {
691
693
  Intent intent = PLYProductActivity.newIntent(cordova.getActivity());
692
694
  intent.putExtra("presentationId", presentationId);
695
+ intent.putExtra("placementId", placementId);
693
696
  intent.putExtra("productId", productId);
694
697
  intent.putExtra("planId", planId);
695
698
  intent.putExtra("contentId", contentId);
@@ -16,8 +16,10 @@
16
16
  NSString *userId = [command argumentAtIndex:2];
17
17
  NSInteger logLevel = [[command argumentAtIndex:3] intValue];
18
18
  NSInteger runningMode = [[command argumentAtIndex:4] intValue];
19
- NSString *sdkBridgeVersion = [command argumentAtIndex:5];
19
+ NSString *purchaselySdkVersion = [command argumentAtIndex:5];
20
20
 
21
+ [Purchasely setSdkBridgeVersion:purchaselySdkVersion];
22
+
21
23
  [Purchasely setAppTechnology:PLYAppTechnologyCordova];
22
24
  [Purchasely startWithAPIKey:apiKey appUserId:userId runningMode:runningMode eventDelegate:nil uiDelegate:nil paywallActionsInterceptor:nil logLevel:logLevel initialized:^(BOOL initialized, NSError * _Nullable error) {
23
25
  if (error != nil) {
@@ -14,14 +14,18 @@
14
14
  NSMutableDictionary<NSString *, NSObject *> *dict = [NSMutableDictionary new];
15
15
 
16
16
  [dict setObject:self.plan.asDictionary forKey:@"plan"];
17
+ [dict setObject:self.product.asDictionary forKey:@"product"];
17
18
  [dict setObject:[NSNumber numberWithInt:self.subscriptionSource] forKey:@"subscriptionSource"];
18
19
 
20
+ NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
21
+ [dateFormat setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"];
22
+
19
23
  if (self.nextRenewalDate != nil) {
20
- [dict setObject:@(self.nextRenewalDate.timeIntervalSince1970) forKey:@"nextRenewalDate"];
24
+ [dict setObject:[dateFormat stringFromDate:self.nextRenewalDate] forKey:@"nextRenewalDate"];
21
25
  }
22
26
 
23
27
  if (self.cancelledDate != nil) {
24
- [dict setObject:@(self.cancelledDate.timeIntervalSince1970) forKey:@"cancelledDate"];
28
+ [dict setObject:[dateFormat stringFromDate:self.cancelledDate] forKey:@"cancelledDate"];
25
29
  }
26
30
 
27
31
  return dict;
package/www/Purchasely.js CHANGED
@@ -137,10 +137,12 @@ exports.Attribute = {
137
137
  AMPLITUDE_SESSION_ID: 0,
138
138
  FIREBASE_APP_INSTANCE_ID: 1,
139
139
  AIRSHIP_CHANNEL_ID: 2,
140
- BATCH_INSTALLATION_ID: 3,
141
- ADJUST_ID: 4,
142
- APPSFLYER_ID: 5,
143
- ONESIGNAL_PLAYER_ID: 6
140
+ BATCH_INSTALLATION_ID: 3,
141
+ ADJUST_ID: 4,
142
+ APPSFLYER_ID: 5,
143
+ ONESIGNAL_PLAYER_ID: 6,
144
+ MIXPANEL_DISTINCT_ID: 7,
145
+ CLEVER_TAP_ID: 8
144
146
  }
145
147
 
146
148
  exports.PurchaseResult = {