@purchasely/cordova-plugin-purchasely 2.2.2 → 2.3.1
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/example/package-lock.json +82 -60
- package/example/package.json +5 -2
- package/example/www/js/index.js +6 -4
- package/package.json +1 -1
- package/plugin.xml +3 -3
- package/src/android/PurchaselyPlugin.java +55 -20
- package/src/ios/CDVPurchasely.h +1 -0
- package/src/ios/CDVPurchasely.m +4 -0
- package/src/ios/Hybrid/PLYPlan+Hybrid.m +1 -0
- package/www/Purchasely.js +13 -5
- package/INTERNAL +0 -33
- package/VERSIONS.md +0 -23
|
@@ -9,14 +9,22 @@
|
|
|
9
9
|
"version": "1.0.0",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"cordova-
|
|
12
|
+
"@purchasely/cordova-plugin-puchasely-google": "file:../../purchasely-google",
|
|
13
|
+
"cordova-android": "^11.0.0",
|
|
13
14
|
"cordova-ios": "^6.2.0",
|
|
15
|
+
"cordova-plugin-puchasely-google": "file:../../purchasely-google",
|
|
14
16
|
"cordova-plugin-purchasely": "file:.."
|
|
15
17
|
}
|
|
16
18
|
},
|
|
17
19
|
"..": {
|
|
18
20
|
"name": "cordova-plugin-purchasely",
|
|
19
|
-
"version": "2.
|
|
21
|
+
"version": "2.3.1",
|
|
22
|
+
"dev": true,
|
|
23
|
+
"license": "ISC"
|
|
24
|
+
},
|
|
25
|
+
"../../purchasely-google": {
|
|
26
|
+
"name": "cordova-plugin-puchasely-google",
|
|
27
|
+
"version": "2.3.1",
|
|
20
28
|
"dev": true,
|
|
21
29
|
"license": "ISC"
|
|
22
30
|
},
|
|
@@ -66,6 +74,10 @@
|
|
|
66
74
|
"node": ">= 8"
|
|
67
75
|
}
|
|
68
76
|
},
|
|
77
|
+
"node_modules/@purchasely/cordova-plugin-puchasely-google": {
|
|
78
|
+
"resolved": "../../purchasely-google",
|
|
79
|
+
"link": true
|
|
80
|
+
},
|
|
69
81
|
"node_modules/abbrev": {
|
|
70
82
|
"version": "1.1.1",
|
|
71
83
|
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
|
@@ -199,31 +211,31 @@
|
|
|
199
211
|
"dev": true
|
|
200
212
|
},
|
|
201
213
|
"node_modules/cordova-android": {
|
|
202
|
-
"version": "
|
|
203
|
-
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-
|
|
204
|
-
"integrity": "sha512-
|
|
214
|
+
"version": "11.0.0",
|
|
215
|
+
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-11.0.0.tgz",
|
|
216
|
+
"integrity": "sha512-ZhvSF5BYY8gmrAu1PtMPdHFsRoom/emT4OtTcecmh3Zj22900y4Golg5whhBPcYcTPC7BU6PG/EmG9BBHcX9tQ==",
|
|
205
217
|
"dev": true,
|
|
206
218
|
"dependencies": {
|
|
207
219
|
"android-versions": "^1.7.0",
|
|
208
220
|
"cordova-common": "^4.0.2",
|
|
209
221
|
"execa": "^5.1.1",
|
|
210
|
-
"fast-glob": "^3.2.
|
|
211
|
-
"fs-extra": "^10.
|
|
222
|
+
"fast-glob": "^3.2.11",
|
|
223
|
+
"fs-extra": "^10.1.0",
|
|
212
224
|
"is-path-inside": "^3.0.3",
|
|
213
225
|
"nopt": "^5.0.0",
|
|
214
226
|
"properties-parser": "^0.3.1",
|
|
215
|
-
"semver": "^7.3.
|
|
227
|
+
"semver": "^7.3.7",
|
|
216
228
|
"untildify": "^4.0.0",
|
|
217
229
|
"which": "^2.0.2"
|
|
218
230
|
},
|
|
219
231
|
"engines": {
|
|
220
|
-
"node": ">=
|
|
232
|
+
"node": ">=14.0.0"
|
|
221
233
|
}
|
|
222
234
|
},
|
|
223
235
|
"node_modules/cordova-android/node_modules/fs-extra": {
|
|
224
|
-
"version": "10.0
|
|
225
|
-
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.
|
|
226
|
-
"integrity": "sha512-
|
|
236
|
+
"version": "10.1.0",
|
|
237
|
+
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
|
|
238
|
+
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
|
|
227
239
|
"dev": true,
|
|
228
240
|
"dependencies": {
|
|
229
241
|
"graceful-fs": "^4.2.0",
|
|
@@ -280,6 +292,10 @@
|
|
|
280
292
|
"node": ">=10"
|
|
281
293
|
}
|
|
282
294
|
},
|
|
295
|
+
"node_modules/cordova-plugin-puchasely-google": {
|
|
296
|
+
"resolved": "../../purchasely-google",
|
|
297
|
+
"link": true
|
|
298
|
+
},
|
|
283
299
|
"node_modules/cordova-plugin-purchasely": {
|
|
284
300
|
"resolved": "..",
|
|
285
301
|
"link": true
|
|
@@ -360,9 +376,9 @@
|
|
|
360
376
|
]
|
|
361
377
|
},
|
|
362
378
|
"node_modules/fast-glob": {
|
|
363
|
-
"version": "3.2.
|
|
364
|
-
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.
|
|
365
|
-
"integrity": "sha512-
|
|
379
|
+
"version": "3.2.11",
|
|
380
|
+
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz",
|
|
381
|
+
"integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==",
|
|
366
382
|
"dev": true,
|
|
367
383
|
"dependencies": {
|
|
368
384
|
"@nodelib/fs.stat": "^2.0.2",
|
|
@@ -372,7 +388,7 @@
|
|
|
372
388
|
"micromatch": "^4.0.4"
|
|
373
389
|
},
|
|
374
390
|
"engines": {
|
|
375
|
-
"node": ">=8"
|
|
391
|
+
"node": ">=8.6.0"
|
|
376
392
|
}
|
|
377
393
|
},
|
|
378
394
|
"node_modules/fast-json-parse": {
|
|
@@ -552,7 +568,7 @@
|
|
|
552
568
|
"node_modules/ios-sim/node_modules/nopt": {
|
|
553
569
|
"version": "1.0.9",
|
|
554
570
|
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz",
|
|
555
|
-
"integrity": "
|
|
571
|
+
"integrity": "sha512-CmUZ3rzN0/4kRHum5pGRiGkhmBMzgtEDxrZVHqRJDSv8qK6s+wzaig/xeyB22Due5aZQeTiEZg/nrmMH2tapDQ==",
|
|
556
572
|
"dev": true,
|
|
557
573
|
"dependencies": {
|
|
558
574
|
"abbrev": "1"
|
|
@@ -565,9 +581,9 @@
|
|
|
565
581
|
}
|
|
566
582
|
},
|
|
567
583
|
"node_modules/is-core-module": {
|
|
568
|
-
"version": "2.
|
|
569
|
-
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.
|
|
570
|
-
"integrity": "sha512
|
|
584
|
+
"version": "2.10.0",
|
|
585
|
+
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz",
|
|
586
|
+
"integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==",
|
|
571
587
|
"dev": true,
|
|
572
588
|
"dependencies": {
|
|
573
589
|
"has": "^1.0.3"
|
|
@@ -848,7 +864,7 @@
|
|
|
848
864
|
"node_modules/properties-parser": {
|
|
849
865
|
"version": "0.3.1",
|
|
850
866
|
"resolved": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.3.1.tgz",
|
|
851
|
-
"integrity": "
|
|
867
|
+
"integrity": "sha512-AkSQxQAviJ89x4FIxOyHGfO3uund0gvYo7lfD0E+Gp7gFQKrTNgtoYQklu8EhrfHVZUzTwKGZx2r/KDSfnljcA==",
|
|
852
868
|
"dev": true,
|
|
853
869
|
"dependencies": {
|
|
854
870
|
"string.prototype.codepointat": "^0.2.0"
|
|
@@ -903,7 +919,7 @@
|
|
|
903
919
|
"node_modules/rechoir": {
|
|
904
920
|
"version": "0.6.2",
|
|
905
921
|
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
|
|
906
|
-
"integrity": "
|
|
922
|
+
"integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
|
|
907
923
|
"dev": true,
|
|
908
924
|
"dependencies": {
|
|
909
925
|
"resolve": "^1.1.6"
|
|
@@ -913,12 +929,12 @@
|
|
|
913
929
|
}
|
|
914
930
|
},
|
|
915
931
|
"node_modules/resolve": {
|
|
916
|
-
"version": "1.22.
|
|
917
|
-
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.
|
|
918
|
-
"integrity": "sha512-
|
|
932
|
+
"version": "1.22.1",
|
|
933
|
+
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
|
|
934
|
+
"integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
|
|
919
935
|
"dev": true,
|
|
920
936
|
"dependencies": {
|
|
921
|
-
"is-core-module": "^2.
|
|
937
|
+
"is-core-module": "^2.9.0",
|
|
922
938
|
"path-parse": "^1.0.7",
|
|
923
939
|
"supports-preserve-symlinks-flag": "^1.0.0"
|
|
924
940
|
},
|
|
@@ -969,9 +985,9 @@
|
|
|
969
985
|
"dev": true
|
|
970
986
|
},
|
|
971
987
|
"node_modules/semver": {
|
|
972
|
-
"version": "7.3.
|
|
973
|
-
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.
|
|
974
|
-
"integrity": "sha512-
|
|
988
|
+
"version": "7.3.7",
|
|
989
|
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
|
|
990
|
+
"integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
|
|
975
991
|
"dev": true,
|
|
976
992
|
"dependencies": {
|
|
977
993
|
"lru-cache": "^6.0.0"
|
|
@@ -1063,7 +1079,7 @@
|
|
|
1063
1079
|
"node_modules/stream-buffers": {
|
|
1064
1080
|
"version": "2.2.0",
|
|
1065
1081
|
"resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz",
|
|
1066
|
-
"integrity": "
|
|
1082
|
+
"integrity": "sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg==",
|
|
1067
1083
|
"dev": true,
|
|
1068
1084
|
"engines": {
|
|
1069
1085
|
"node": ">= 0.10.0"
|
|
@@ -1108,7 +1124,7 @@
|
|
|
1108
1124
|
"node_modules/tail": {
|
|
1109
1125
|
"version": "0.4.0",
|
|
1110
1126
|
"resolved": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz",
|
|
1111
|
-
"integrity": "
|
|
1127
|
+
"integrity": "sha512-i5rOhX0PwkFSbjID14mmuoqrLUIqpJeBwg0esugSbb+6Y+dzgN/O3YZXzzPL7dnQJGbQLs8cwM8Zsak5kFJGcA==",
|
|
1112
1128
|
"dev": true,
|
|
1113
1129
|
"engines": {
|
|
1114
1130
|
"node": ">= 0.4.0"
|
|
@@ -1219,7 +1235,7 @@
|
|
|
1219
1235
|
"node_modules/xml-escape": {
|
|
1220
1236
|
"version": "1.1.0",
|
|
1221
1237
|
"resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz",
|
|
1222
|
-
"integrity": "
|
|
1238
|
+
"integrity": "sha512-B/T4sDK8Z6aUh/qNr7mjKAwwncIljFuUP+DO/D5hloYFj+90O88z8Wf7oSucZTHxBAsC1/CTP4rtx/x1Uf72Mg==",
|
|
1223
1239
|
"dev": true
|
|
1224
1240
|
},
|
|
1225
1241
|
"node_modules/xmlbuilder": {
|
|
@@ -1276,6 +1292,9 @@
|
|
|
1276
1292
|
"fastq": "^1.6.0"
|
|
1277
1293
|
}
|
|
1278
1294
|
},
|
|
1295
|
+
"@purchasely/cordova-plugin-puchasely-google": {
|
|
1296
|
+
"version": "file:../../purchasely-google"
|
|
1297
|
+
},
|
|
1279
1298
|
"abbrev": {
|
|
1280
1299
|
"version": "1.1.1",
|
|
1281
1300
|
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
|
@@ -1379,28 +1398,28 @@
|
|
|
1379
1398
|
"dev": true
|
|
1380
1399
|
},
|
|
1381
1400
|
"cordova-android": {
|
|
1382
|
-
"version": "
|
|
1383
|
-
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-
|
|
1384
|
-
"integrity": "sha512-
|
|
1401
|
+
"version": "11.0.0",
|
|
1402
|
+
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-11.0.0.tgz",
|
|
1403
|
+
"integrity": "sha512-ZhvSF5BYY8gmrAu1PtMPdHFsRoom/emT4OtTcecmh3Zj22900y4Golg5whhBPcYcTPC7BU6PG/EmG9BBHcX9tQ==",
|
|
1385
1404
|
"dev": true,
|
|
1386
1405
|
"requires": {
|
|
1387
1406
|
"android-versions": "^1.7.0",
|
|
1388
1407
|
"cordova-common": "^4.0.2",
|
|
1389
1408
|
"execa": "^5.1.1",
|
|
1390
|
-
"fast-glob": "^3.2.
|
|
1391
|
-
"fs-extra": "^10.
|
|
1409
|
+
"fast-glob": "^3.2.11",
|
|
1410
|
+
"fs-extra": "^10.1.0",
|
|
1392
1411
|
"is-path-inside": "^3.0.3",
|
|
1393
1412
|
"nopt": "^5.0.0",
|
|
1394
1413
|
"properties-parser": "^0.3.1",
|
|
1395
|
-
"semver": "^7.3.
|
|
1414
|
+
"semver": "^7.3.7",
|
|
1396
1415
|
"untildify": "^4.0.0",
|
|
1397
1416
|
"which": "^2.0.2"
|
|
1398
1417
|
},
|
|
1399
1418
|
"dependencies": {
|
|
1400
1419
|
"fs-extra": {
|
|
1401
|
-
"version": "10.0
|
|
1402
|
-
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.
|
|
1403
|
-
"integrity": "sha512-
|
|
1420
|
+
"version": "10.1.0",
|
|
1421
|
+
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
|
|
1422
|
+
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
|
|
1404
1423
|
"dev": true,
|
|
1405
1424
|
"requires": {
|
|
1406
1425
|
"graceful-fs": "^4.2.0",
|
|
@@ -1450,6 +1469,9 @@
|
|
|
1450
1469
|
"xml-escape": "^1.1.0"
|
|
1451
1470
|
}
|
|
1452
1471
|
},
|
|
1472
|
+
"cordova-plugin-puchasely-google": {
|
|
1473
|
+
"version": "file:../../purchasely-google"
|
|
1474
|
+
},
|
|
1453
1475
|
"cordova-plugin-purchasely": {
|
|
1454
1476
|
"version": "file:.."
|
|
1455
1477
|
},
|
|
@@ -1514,9 +1536,9 @@
|
|
|
1514
1536
|
"dev": true
|
|
1515
1537
|
},
|
|
1516
1538
|
"fast-glob": {
|
|
1517
|
-
"version": "3.2.
|
|
1518
|
-
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.
|
|
1519
|
-
"integrity": "sha512-
|
|
1539
|
+
"version": "3.2.11",
|
|
1540
|
+
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz",
|
|
1541
|
+
"integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==",
|
|
1520
1542
|
"dev": true,
|
|
1521
1543
|
"requires": {
|
|
1522
1544
|
"@nodelib/fs.stat": "^2.0.2",
|
|
@@ -1667,7 +1689,7 @@
|
|
|
1667
1689
|
"nopt": {
|
|
1668
1690
|
"version": "1.0.9",
|
|
1669
1691
|
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz",
|
|
1670
|
-
"integrity": "
|
|
1692
|
+
"integrity": "sha512-CmUZ3rzN0/4kRHum5pGRiGkhmBMzgtEDxrZVHqRJDSv8qK6s+wzaig/xeyB22Due5aZQeTiEZg/nrmMH2tapDQ==",
|
|
1671
1693
|
"dev": true,
|
|
1672
1694
|
"requires": {
|
|
1673
1695
|
"abbrev": "1"
|
|
@@ -1676,9 +1698,9 @@
|
|
|
1676
1698
|
}
|
|
1677
1699
|
},
|
|
1678
1700
|
"is-core-module": {
|
|
1679
|
-
"version": "2.
|
|
1680
|
-
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.
|
|
1681
|
-
"integrity": "sha512
|
|
1701
|
+
"version": "2.10.0",
|
|
1702
|
+
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz",
|
|
1703
|
+
"integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==",
|
|
1682
1704
|
"dev": true,
|
|
1683
1705
|
"requires": {
|
|
1684
1706
|
"has": "^1.0.3"
|
|
@@ -1882,7 +1904,7 @@
|
|
|
1882
1904
|
"properties-parser": {
|
|
1883
1905
|
"version": "0.3.1",
|
|
1884
1906
|
"resolved": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.3.1.tgz",
|
|
1885
|
-
"integrity": "
|
|
1907
|
+
"integrity": "sha512-AkSQxQAviJ89x4FIxOyHGfO3uund0gvYo7lfD0E+Gp7gFQKrTNgtoYQklu8EhrfHVZUzTwKGZx2r/KDSfnljcA==",
|
|
1886
1908
|
"dev": true,
|
|
1887
1909
|
"requires": {
|
|
1888
1910
|
"string.prototype.codepointat": "^0.2.0"
|
|
@@ -1913,19 +1935,19 @@
|
|
|
1913
1935
|
"rechoir": {
|
|
1914
1936
|
"version": "0.6.2",
|
|
1915
1937
|
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
|
|
1916
|
-
"integrity": "
|
|
1938
|
+
"integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
|
|
1917
1939
|
"dev": true,
|
|
1918
1940
|
"requires": {
|
|
1919
1941
|
"resolve": "^1.1.6"
|
|
1920
1942
|
}
|
|
1921
1943
|
},
|
|
1922
1944
|
"resolve": {
|
|
1923
|
-
"version": "1.22.
|
|
1924
|
-
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.
|
|
1925
|
-
"integrity": "sha512-
|
|
1945
|
+
"version": "1.22.1",
|
|
1946
|
+
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
|
|
1947
|
+
"integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
|
|
1926
1948
|
"dev": true,
|
|
1927
1949
|
"requires": {
|
|
1928
|
-
"is-core-module": "^2.
|
|
1950
|
+
"is-core-module": "^2.9.0",
|
|
1929
1951
|
"path-parse": "^1.0.7",
|
|
1930
1952
|
"supports-preserve-symlinks-flag": "^1.0.0"
|
|
1931
1953
|
}
|
|
@@ -1952,9 +1974,9 @@
|
|
|
1952
1974
|
"dev": true
|
|
1953
1975
|
},
|
|
1954
1976
|
"semver": {
|
|
1955
|
-
"version": "7.3.
|
|
1956
|
-
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.
|
|
1957
|
-
"integrity": "sha512-
|
|
1977
|
+
"version": "7.3.7",
|
|
1978
|
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
|
|
1979
|
+
"integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
|
|
1958
1980
|
"dev": true,
|
|
1959
1981
|
"requires": {
|
|
1960
1982
|
"lru-cache": "^6.0.0"
|
|
@@ -2027,7 +2049,7 @@
|
|
|
2027
2049
|
"stream-buffers": {
|
|
2028
2050
|
"version": "2.2.0",
|
|
2029
2051
|
"resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz",
|
|
2030
|
-
"integrity": "
|
|
2052
|
+
"integrity": "sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg==",
|
|
2031
2053
|
"dev": true
|
|
2032
2054
|
},
|
|
2033
2055
|
"string.prototype.codepointat": {
|
|
@@ -2057,7 +2079,7 @@
|
|
|
2057
2079
|
"tail": {
|
|
2058
2080
|
"version": "0.4.0",
|
|
2059
2081
|
"resolved": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz",
|
|
2060
|
-
"integrity": "
|
|
2082
|
+
"integrity": "sha512-i5rOhX0PwkFSbjID14mmuoqrLUIqpJeBwg0esugSbb+6Y+dzgN/O3YZXzzPL7dnQJGbQLs8cwM8Zsak5kFJGcA==",
|
|
2061
2083
|
"dev": true
|
|
2062
2084
|
},
|
|
2063
2085
|
"to-regex-range": {
|
|
@@ -2138,7 +2160,7 @@
|
|
|
2138
2160
|
"xml-escape": {
|
|
2139
2161
|
"version": "1.1.0",
|
|
2140
2162
|
"resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz",
|
|
2141
|
-
"integrity": "
|
|
2163
|
+
"integrity": "sha512-B/T4sDK8Z6aUh/qNr7mjKAwwncIljFuUP+DO/D5hloYFj+90O88z8Wf7oSucZTHxBAsC1/CTP4rtx/x1Uf72Mg==",
|
|
2142
2164
|
"dev": true
|
|
2143
2165
|
},
|
|
2144
2166
|
"xmlbuilder": {
|
package/example/package.json
CHANGED
|
@@ -13,13 +13,16 @@
|
|
|
13
13
|
"author": "Apache Cordova Team",
|
|
14
14
|
"license": "Apache-2.0",
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"cordova-
|
|
16
|
+
"@purchasely/cordova-plugin-puchasely-google": "file:../../purchasely-google",
|
|
17
|
+
"cordova-android": "^11.0.0",
|
|
17
18
|
"cordova-ios": "^6.2.0",
|
|
19
|
+
"cordova-plugin-puchasely-google": "file:../../purchasely-google",
|
|
18
20
|
"cordova-plugin-purchasely": "file:.."
|
|
19
21
|
},
|
|
20
22
|
"cordova": {
|
|
21
23
|
"plugins": {
|
|
22
|
-
"cordova-plugin-
|
|
24
|
+
"cordova-plugin-puchasely-google": {},
|
|
25
|
+
"@purchasely/cordova-plugin-puchasely-google": {}
|
|
23
26
|
},
|
|
24
27
|
"platforms": [
|
|
25
28
|
"android",
|
package/example/www/js/index.js
CHANGED
|
@@ -27,10 +27,12 @@ function onDeviceReady() {
|
|
|
27
27
|
console.log('Running cordova-' + cordova.platformId + '@' + cordova.version);
|
|
28
28
|
document.getElementById('deviceready').classList.add('ready');
|
|
29
29
|
|
|
30
|
-
Purchasely.setLanguage('en')
|
|
30
|
+
Purchasely.setLanguage('en');
|
|
31
|
+
|
|
32
|
+
Purchasely.userDidConsumeSubscriptionContent();
|
|
31
33
|
|
|
32
34
|
Purchasely.startWithAPIKey(
|
|
33
|
-
'
|
|
35
|
+
'fcb39be4-2ba4-4db7-bde3-2a5a1e20745d',
|
|
34
36
|
['Google'],
|
|
35
37
|
null,
|
|
36
38
|
Purchasely.LogLevel.DEBUG,
|
|
@@ -98,6 +100,7 @@ function onPuchaselySdkReady() {
|
|
|
98
100
|
console.log(plan.introPrice);
|
|
99
101
|
console.log(plan.introAmount);
|
|
100
102
|
console.log(plan.introDuration);
|
|
103
|
+
console.log('Eligible for intro offer ? ' + plan.isEligibleForIntroOffer);
|
|
101
104
|
}, (error) => {
|
|
102
105
|
console.log(error);
|
|
103
106
|
});
|
|
@@ -126,7 +129,7 @@ function onPuchaselySdkReady() {
|
|
|
126
129
|
result.parameters.url
|
|
127
130
|
);
|
|
128
131
|
console.log('prevent Purchasely SDK to navigate to website');
|
|
129
|
-
Purchasely.onProcessAction(
|
|
132
|
+
Purchasely.onProcessAction(true);
|
|
130
133
|
} else if (result.action === Purchasely.PaywallAction.close) {
|
|
131
134
|
console.log('User wants to close paywall');
|
|
132
135
|
Purchasely.onProcessAction(true);
|
|
@@ -144,7 +147,6 @@ function onPuchaselySdkReady() {
|
|
|
144
147
|
console.log('User wants to purchase');
|
|
145
148
|
//If you want to intercept it, close paywall and display your screen
|
|
146
149
|
Purchasely.closePaywall();
|
|
147
|
-
Purchasely.onProcessAction(true);
|
|
148
150
|
} else if (result.action === Purchasely.PaywallAction.restore) {
|
|
149
151
|
console.log('User wants to restore his purchases');
|
|
150
152
|
Purchasely.onProcessAction(true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purchasely/cordova-plugin-purchasely",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
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
|
+
<plugin id="@purchasely/cordova-plugin-purchasely" version="2.3.1" 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.
|
|
31
|
+
<pod name="Purchasely" spec="3.3.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
|
|
54
|
+
<framework src="io.purchasely:core:3.3.2" />
|
|
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" />
|
|
@@ -59,7 +59,8 @@ public class PurchaselyPlugin extends CordovaPlugin {
|
|
|
59
59
|
static CallbackContext eventsCallback = null;
|
|
60
60
|
static ProductActivity productActivity = null;
|
|
61
61
|
|
|
62
|
-
private PLYProcessActionListener processActionListener;
|
|
62
|
+
@Nullable private PLYProcessActionListener processActionListener;
|
|
63
|
+
@Nullable private PLYPresentationAction paywallAction;
|
|
63
64
|
|
|
64
65
|
private static int runningModeTransactionOnly = 0;
|
|
65
66
|
private static int runningModeObserver = 1;
|
|
@@ -194,6 +195,9 @@ public class PurchaselyPlugin extends CordovaPlugin {
|
|
|
194
195
|
case "closePaywall":
|
|
195
196
|
closePaywall(callbackContext);
|
|
196
197
|
break;
|
|
198
|
+
case "userDidConsumeSubscriptionContent":
|
|
199
|
+
userDidConsumeSubscriptionContent();
|
|
200
|
+
break;
|
|
197
201
|
default:
|
|
198
202
|
return false;
|
|
199
203
|
}
|
|
@@ -397,6 +401,10 @@ public class PurchaselyPlugin extends CordovaPlugin {
|
|
|
397
401
|
Purchasely.synchronize();
|
|
398
402
|
}
|
|
399
403
|
|
|
404
|
+
private void userDidConsumeSubscriptionContent() {
|
|
405
|
+
Purchasely.userDidConsumeSubscriptionContent();
|
|
406
|
+
}
|
|
407
|
+
|
|
400
408
|
private void presentPresentationWithIdentifier(String presentationVendorId,
|
|
401
409
|
String contentId,
|
|
402
410
|
boolean isFullScreen,
|
|
@@ -586,6 +594,7 @@ public class PurchaselyPlugin extends CordovaPlugin {
|
|
|
586
594
|
Purchasely.setPaywallActionsInterceptor(
|
|
587
595
|
(info, plyPresentationAction, map, plyProcessActionListener) -> {
|
|
588
596
|
processActionListener = plyProcessActionListener;
|
|
597
|
+
paywallAction = plyPresentationAction;
|
|
589
598
|
|
|
590
599
|
String url = null;
|
|
591
600
|
if(map.getUrl() != null) {
|
|
@@ -620,7 +629,10 @@ public class PurchaselyPlugin extends CordovaPlugin {
|
|
|
620
629
|
}
|
|
621
630
|
|
|
622
631
|
private void closePaywall(CallbackContext callbackContext) {
|
|
623
|
-
Activity purchaselyActivity =
|
|
632
|
+
Activity purchaselyActivity = null;
|
|
633
|
+
if(productActivity != null && productActivity.activity != null) {
|
|
634
|
+
purchaselyActivity = productActivity.activity.get();
|
|
635
|
+
}
|
|
624
636
|
Activity activity = purchaselyActivity != null ? purchaselyActivity : cordova.getActivity();
|
|
625
637
|
Intent intent = new Intent(activity, cordova.getActivity().getClass());
|
|
626
638
|
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
|
@@ -628,24 +640,40 @@ public class PurchaselyPlugin extends CordovaPlugin {
|
|
|
628
640
|
}
|
|
629
641
|
|
|
630
642
|
private void onProcessAction(boolean processAction) {
|
|
631
|
-
if(processActionListener
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
643
|
+
if(processActionListener == null) return;
|
|
644
|
+
|
|
645
|
+
PLYPresentationAction action = PLYPresentationAction.CLOSE;
|
|
646
|
+
if(paywallAction != null) action = paywallAction;
|
|
647
|
+
|
|
648
|
+
switch (action) {
|
|
649
|
+
case PROMO_CODE:
|
|
650
|
+
case RESTORE:
|
|
651
|
+
case PURCHASE:
|
|
652
|
+
case LOGIN:
|
|
653
|
+
case OPEN_PRESENTATION:
|
|
654
|
+
processActionWithPaywallActivity(processAction);
|
|
655
|
+
break;
|
|
656
|
+
default:
|
|
657
|
+
cordova.getActivity().runOnUiThread(() -> processActionListener.processAction(processAction));
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
private void processActionWithPaywallActivity(boolean processAction) {
|
|
662
|
+
if(processActionListener == null) return;
|
|
663
|
+
|
|
664
|
+
boolean softRelaunched = productActivity != null && productActivity.relaunch(cordova);
|
|
665
|
+
if(softRelaunched) {
|
|
666
|
+
cordova.getActivity().runOnUiThread(() -> processActionListener.processAction(processAction));
|
|
667
|
+
} else {
|
|
668
|
+
new Thread(() -> {
|
|
669
|
+
try {
|
|
670
|
+
Thread.sleep(500);
|
|
671
|
+
} catch (InterruptedException e) {
|
|
672
|
+
Log.e("Purchasely", "process action error", e);
|
|
673
|
+
} finally {
|
|
635
674
|
cordova.getActivity().runOnUiThread(() -> processActionListener.processAction(processAction));
|
|
636
|
-
} else {
|
|
637
|
-
new Thread(() -> {
|
|
638
|
-
try {
|
|
639
|
-
Thread.sleep(500);
|
|
640
|
-
} catch (InterruptedException e) {
|
|
641
|
-
Log.e("Purchasely", "process action error", e);
|
|
642
|
-
} finally {
|
|
643
|
-
cordova.getActivity().runOnUiThread(() -> processActionListener.processAction(processAction));
|
|
644
|
-
}
|
|
645
|
-
}).start();
|
|
646
675
|
}
|
|
647
|
-
|
|
648
|
-
}
|
|
676
|
+
}).start();
|
|
649
677
|
}
|
|
650
678
|
}
|
|
651
679
|
|
|
@@ -664,6 +692,8 @@ public class PurchaselyPlugin extends CordovaPlugin {
|
|
|
664
692
|
} else if(plan.getType() == DistributionType.UNKNOWN) {
|
|
665
693
|
map.put("type", DistributionType.UNKNOWN.ordinal());
|
|
666
694
|
}
|
|
695
|
+
|
|
696
|
+
map.put("isEligibleForIntroOffer", plan.isEligibleToIntroOffer());
|
|
667
697
|
return map;
|
|
668
698
|
}
|
|
669
699
|
|
|
@@ -673,10 +703,15 @@ public class PurchaselyPlugin extends CordovaPlugin {
|
|
|
673
703
|
String productId = null;
|
|
674
704
|
String planId = null;
|
|
675
705
|
String contentId = null;
|
|
676
|
-
WeakReference<PLYProductActivity> activity = null;
|
|
706
|
+
@Nullable WeakReference<PLYProductActivity> activity = null;
|
|
677
707
|
|
|
678
708
|
public boolean relaunch(CordovaInterface cordova) {
|
|
679
|
-
PLYProductActivity backgroundActivity =
|
|
709
|
+
PLYProductActivity backgroundActivity = null;
|
|
710
|
+
|
|
711
|
+
if(activity != null) {
|
|
712
|
+
backgroundActivity = activity.get();
|
|
713
|
+
}
|
|
714
|
+
|
|
680
715
|
if(backgroundActivity != null
|
|
681
716
|
&& !backgroundActivity.isFinishing()
|
|
682
717
|
&& !backgroundActivity.isDestroyed()) {
|
package/src/ios/CDVPurchasely.h
CHANGED
|
@@ -47,5 +47,6 @@
|
|
|
47
47
|
- (void)setPaywallActionInterceptor:(CDVInvokedUrlCommand*)command;
|
|
48
48
|
- (void)onProcessAction:(CDVInvokedUrlCommand*)command;
|
|
49
49
|
- (void)closePaywall:(CDVInvokedUrlCommand*)command;
|
|
50
|
+
- (void)userDidConsumeSubscriptionContent:(CDVInvokedUrlCommand*)command;
|
|
50
51
|
|
|
51
52
|
@end
|
package/src/ios/CDVPurchasely.m
CHANGED
|
@@ -442,6 +442,10 @@
|
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
444
|
|
|
445
|
+
- (void)userDidConsumeSubscriptionContent:(CDVInvokedUrlCommand*)command {
|
|
446
|
+
[Purchasely userDidConsumeSubscriptionContent];
|
|
447
|
+
}
|
|
448
|
+
|
|
445
449
|
- (void)successFor:(CDVInvokedUrlCommand *)command {
|
|
446
450
|
CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
|
|
447
451
|
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
[dict setObject:self.vendorId forKey:@"vendorId"];
|
|
16
16
|
[dict setObject:@(self.hasIntroductoryPrice) forKey:@"hasIntroductoryPrice"];
|
|
17
17
|
[dict setObject:@([self type]) forKey:@"type"];
|
|
18
|
+
[dict setObject:@([self isEligibleForIntroOffer]) forKey:@"isEligibleForIntroOffer"];
|
|
18
19
|
|
|
19
20
|
if (self.hasIntroductoryPrice && [[self introAmount] intValue] == 0) {
|
|
20
21
|
[dict setObject:@(YES) forKey:@"hasFreeTrial"];
|
package/www/Purchasely.js
CHANGED
|
@@ -5,7 +5,7 @@ var defaultError = (e) => { console.log(e); }
|
|
|
5
5
|
exports.startWithAPIKey = function (apiKey, stores, userId, logLevel, runningMode, success, error) {
|
|
6
6
|
var cordovaSdkVersion = cordova.define.moduleMap['cordova/plugin_list'].exports['metadata']['cordova-plugin-purchasely']
|
|
7
7
|
if(!cordovaSdkVersion) {
|
|
8
|
-
cordovaSdkVersion = "2.
|
|
8
|
+
cordovaSdkVersion = "2.3.0" //fallback if we cannot find version from metadata
|
|
9
9
|
}
|
|
10
10
|
exec(success, error, 'Purchasely', 'startWithAPIKey', [apiKey, stores, userId, logLevel, runningMode, cordovaSdkVersion]);
|
|
11
11
|
};
|
|
@@ -118,6 +118,10 @@ exports.closePaywall = function () {
|
|
|
118
118
|
exec(() => {}, defaultError, 'Purchasely', 'closePaywall', []);
|
|
119
119
|
};
|
|
120
120
|
|
|
121
|
+
exports.userDidConsumeSubscriptionContent = function () {
|
|
122
|
+
exec(() => {}, defaultError, 'Purchasely', 'userDidConsumeSubscriptionContent', []);
|
|
123
|
+
};
|
|
124
|
+
|
|
121
125
|
exports.userSubscriptions = function (success, error) {
|
|
122
126
|
exec(success, defaultError, 'Purchasely', 'userSubscriptions', []);
|
|
123
127
|
};
|
|
@@ -134,15 +138,19 @@ exports.LogLevel = {
|
|
|
134
138
|
}
|
|
135
139
|
|
|
136
140
|
exports.Attribute = {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
141
|
+
AMPLITUDE_SESSION_ID: 0,
|
|
142
|
+
FIREBASE_APP_INSTANCE_ID: 1,
|
|
143
|
+
AIRSHIP_CHANNEL_ID: 2,
|
|
140
144
|
BATCH_INSTALLATION_ID: 3,
|
|
141
145
|
ADJUST_ID: 4,
|
|
142
146
|
APPSFLYER_ID: 5,
|
|
143
147
|
ONESIGNAL_PLAYER_ID: 6,
|
|
144
148
|
MIXPANEL_DISTINCT_ID: 7,
|
|
145
|
-
CLEVER_TAP_ID: 8
|
|
149
|
+
CLEVER_TAP_ID: 8,
|
|
150
|
+
SENDINBLUE_USER_EMAIL: 9,
|
|
151
|
+
ITERABLE_USER_ID: 10,
|
|
152
|
+
ITERABLE_USER_EMAIL: 11,
|
|
153
|
+
AT_INTERNET_ID_CLIENT: 12
|
|
146
154
|
}
|
|
147
155
|
|
|
148
156
|
exports.PurchaseResult = {
|
package/INTERNAL
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# Purchasely-Cordova-Sources
|
|
2
|
-
|
|
3
|
-
## Add plugin :
|
|
4
|
-
|
|
5
|
-
`cd example/`
|
|
6
|
-
|
|
7
|
-
`cordova plugin add /home/kevin/Documents/Purchasely/Cordova/Purchasely --link`
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## Add android platform :
|
|
11
|
-
|
|
12
|
-
`cd example/`
|
|
13
|
-
|
|
14
|
-
`cordova platform add android`
|
|
15
|
-
|
|
16
|
-
`cordova run android`
|
|
17
|
-
|
|
18
|
-
### Add Google-Play dependencies
|
|
19
|
-
|
|
20
|
-
In folder `example/platforms/android/app` create a file called `build-extras.gradle` and add thoses lines :
|
|
21
|
-
```groovy
|
|
22
|
-
dependencies {
|
|
23
|
-
implementation "io.purchasely:google-play:2.5.5"
|
|
24
|
-
}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### Troubleshot
|
|
28
|
-
|
|
29
|
-
`cd example/`
|
|
30
|
-
|
|
31
|
-
`cordova platform remove android`
|
|
32
|
-
|
|
33
|
-
`cordova plugin remove cordova-plugin-purchasely`
|
package/VERSIONS.md
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
This file provides the underlying native SDK versions that the Cordova SDK relies on.
|
|
2
|
-
|
|
3
|
-
| Version | iOS version | Android version |
|
|
4
|
-
|---------|-------------|-----------------|
|
|
5
|
-
| 1.0.2 | 2.5.3 | 2.5.4 |
|
|
6
|
-
| 1.0.3 | 2.5.5 | 2.5.5 |
|
|
7
|
-
| 1.0.4 | 2.5.5 | 2.5.6 |
|
|
8
|
-
| 1.0.5 | 2.6.0 | 2.5.6 |
|
|
9
|
-
| 1.1.0 | 2.7.2 | 2.7.2 |
|
|
10
|
-
| 1.1.1 | 2.7.3 | 2.7.2 |
|
|
11
|
-
| 1.1.2 | 2.7.3 | 2.7.2 |
|
|
12
|
-
| 1.1.3 | 2.7.3 | 2.7.2 |
|
|
13
|
-
| 1.1.6 | 2.7.3 | 2.7.3 |
|
|
14
|
-
| 1.1.7 | 2.7.3 | 2.7.4 |
|
|
15
|
-
| 1.1.8 | 2.7.3 | 2.7.6 |
|
|
16
|
-
| 1.2.0 | 2.8.0 | 2.8.0 |
|
|
17
|
-
| 2.0.0 | 3.0.0 | 3.0.1 |
|
|
18
|
-
| 2.0.1 | 3.0.0 | 3.0.1 |
|
|
19
|
-
| 2.1.0 | 3.1.0 | 3.1.0 |
|
|
20
|
-
| 2.1.1 | 3.1.0 | 3.1.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 |
|