@purchasely/cordova-plugin-purchasely 6.0.0-rc.1 → 6.0.0-rc.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/example/config.xml +1 -1
- package/example/package-lock.json +16 -13
- package/example/package.json +2 -1
- package/package.json +1 -1
- package/plugin.xml +4 -3
- package/src/ios/CDVPurchasely.m +16 -16
- package/www/Purchasely.js +1 -1
package/example/config.xml
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<platform name="android">
|
|
19
19
|
<allow-intent href="market:*" />
|
|
20
20
|
<preference name="GradlePluginKotlinEnabled" value="true" />
|
|
21
|
-
<preference name="GradlePluginKotlinVersion" value="2.
|
|
21
|
+
<preference name="GradlePluginKotlinVersion" value="2.3.21" />
|
|
22
22
|
</platform>
|
|
23
23
|
<platform name="ios">
|
|
24
24
|
<allow-intent href="itms:*" />
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"..": {
|
|
21
21
|
"name": "@purchasely/cordova-plugin-purchasely",
|
|
22
|
-
"version": "6.0.0-rc.
|
|
22
|
+
"version": "6.0.0-rc.3",
|
|
23
23
|
"dev": true,
|
|
24
24
|
"license": "ISC",
|
|
25
25
|
"devDependencies": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"../../purchasely-google": {
|
|
38
38
|
"name": "@purchasely/cordova-plugin-purchasely-google",
|
|
39
|
-
"version": "6.0.0-rc.
|
|
39
|
+
"version": "6.0.0-rc.3",
|
|
40
40
|
"dev": true,
|
|
41
41
|
"license": "ISC"
|
|
42
42
|
},
|
|
@@ -111,9 +111,9 @@
|
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
"node_modules/android-versions": {
|
|
114
|
-
"version": "2.
|
|
115
|
-
"resolved": "https://registry.npmjs.org/android-versions/-/android-versions-2.
|
|
116
|
-
"integrity": "sha512-
|
|
114
|
+
"version": "2.2.0",
|
|
115
|
+
"resolved": "https://registry.npmjs.org/android-versions/-/android-versions-2.2.0.tgz",
|
|
116
|
+
"integrity": "sha512-lrad0HHmy9406sSmBHYIetx4n3WMnVVD+HMv7C+YJrByLFGPYWvlM1WcYrYL+e2s1GErvRF85nWsRY7RpwIGLw==",
|
|
117
117
|
"dev": true,
|
|
118
118
|
"license": "MIT",
|
|
119
119
|
"dependencies": {
|
|
@@ -236,9 +236,9 @@
|
|
|
236
236
|
}
|
|
237
237
|
},
|
|
238
238
|
"node_modules/cordova-ios": {
|
|
239
|
-
"version": "8.1.
|
|
240
|
-
"resolved": "https://registry.npmjs.org/cordova-ios/-/cordova-ios-8.1.
|
|
241
|
-
"integrity": "sha512-
|
|
239
|
+
"version": "8.1.1",
|
|
240
|
+
"resolved": "https://registry.npmjs.org/cordova-ios/-/cordova-ios-8.1.1.tgz",
|
|
241
|
+
"integrity": "sha512-fiowa8HeuVd45ZI2fb2az1qDAqlm3H9ruVcXBDUJ3FneMoMmwKKrsrg2tc5L4C8z2ZTZ3d7+NDl/XqJ2M9Ydyw==",
|
|
242
242
|
"dev": true,
|
|
243
243
|
"license": "Apache-2.0",
|
|
244
244
|
"dependencies": {
|
|
@@ -804,14 +804,17 @@
|
|
|
804
804
|
}
|
|
805
805
|
},
|
|
806
806
|
"node_modules/uuid": {
|
|
807
|
-
"version": "
|
|
808
|
-
"resolved": "https://registry.npmjs.org/uuid/-/uuid-
|
|
809
|
-
"integrity": "sha512-
|
|
810
|
-
"deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).",
|
|
807
|
+
"version": "11.1.1",
|
|
808
|
+
"resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.1.tgz",
|
|
809
|
+
"integrity": "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==",
|
|
811
810
|
"dev": true,
|
|
811
|
+
"funding": [
|
|
812
|
+
"https://github.com/sponsors/broofa",
|
|
813
|
+
"https://github.com/sponsors/ctavan"
|
|
814
|
+
],
|
|
812
815
|
"license": "MIT",
|
|
813
816
|
"bin": {
|
|
814
|
-
"uuid": "dist/bin/uuid"
|
|
817
|
+
"uuid": "dist/esm/bin/uuid"
|
|
815
818
|
}
|
|
816
819
|
},
|
|
817
820
|
"node_modules/which": {
|
package/example/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purchasely/cordova-plugin-purchasely",
|
|
3
|
-
"version": "6.0.0-rc.
|
|
3
|
+
"version": "6.0.0-rc.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="6.0.0-rc.
|
|
2
|
+
<plugin id="@purchasely/cordova-plugin-purchasely" version="6.0.0-rc.3" 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" />
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<source url="https://github.com/CocoaPods/Specs.git"/>
|
|
39
39
|
</config>
|
|
40
40
|
<pods use-frameworks="true">
|
|
41
|
-
<pod name="Purchasely" spec="6.0.0-rc.
|
|
41
|
+
<pod name="Purchasely" spec="6.0.0-rc.3"/>
|
|
42
42
|
</pods>
|
|
43
43
|
</podspec>
|
|
44
44
|
</platform>
|
|
@@ -49,10 +49,11 @@
|
|
|
49
49
|
</feature>
|
|
50
50
|
<preference name="AndroidXEnabled" value="true" />
|
|
51
51
|
<preference name="GradlePluginKotlinEnabled" value="true" />
|
|
52
|
+
<preference name="GradlePluginKotlinVersion" value="2.3.21" />
|
|
52
53
|
<preference name="GradlePluginKotlinCodeStyle" value="official" />
|
|
53
54
|
</config-file>
|
|
54
55
|
<framework src="src/android/build-extras.gradle" custom="true" type="gradleReference" />
|
|
55
|
-
<framework src="io.purchasely:core:6.0.0-rc.
|
|
56
|
+
<framework src="io.purchasely:core:6.0.0-rc.3" />
|
|
56
57
|
<source-file src="src/android/PurchaselyPlugin.kt" target-dir="java/cordova/plugin/purchasely" />
|
|
57
58
|
</platform>
|
|
58
59
|
</plugin>
|
package/src/ios/CDVPurchasely.m
CHANGED
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
[r setKeepCallbackAsBool:YES];
|
|
277
277
|
[strongSelf.commandDelegate sendPluginResult:r callbackId:callbackId];
|
|
278
278
|
}];
|
|
279
|
-
builder = [builder
|
|
279
|
+
builder = [builder onCloseRequested:^{
|
|
280
280
|
CDVPurchasely *strongSelf = weakSelf; if (strongSelf == nil) return;
|
|
281
281
|
CDVPluginResult *r = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:@{@"event": @"closeRequested"}];
|
|
282
282
|
[r setKeepCallbackAsBool:YES];
|
|
@@ -555,13 +555,13 @@
|
|
|
555
555
|
|
|
556
556
|
// Helpers
|
|
557
557
|
|
|
558
|
-
// v6: builds a
|
|
558
|
+
// v6: builds a PLYTransition from the JS transition object (see normalizeTransition):
|
|
559
559
|
// { type, dismissible?, height?: { type: 'pixel'|'percentage', value }, backgroundColor? }
|
|
560
560
|
// (a bare mode string is also tolerated). Objective-C only exposes percentage height for
|
|
561
561
|
// drawer/popin (pixel height and popin width are Swift-only in the SDK), so those honor a
|
|
562
562
|
// percentage height + dismissible + background colors; other dimensions are ignored.
|
|
563
563
|
// Returns nil for an unknown/absent value so the backend-defined default is honored.
|
|
564
|
-
- (
|
|
564
|
+
- (PLYTransition * _Nullable) displayModeFromTransition:(id) transition {
|
|
565
565
|
NSDictionary *map = [transition isKindOfClass:[NSDictionary class]] ? transition : nil;
|
|
566
566
|
NSString *type = map != nil ? map[@"type"] : ([transition isKindOfClass:[NSString class]] ? transition : nil);
|
|
567
567
|
if (![type isKindOfClass:[NSString class]]) {
|
|
@@ -593,17 +593,17 @@
|
|
|
593
593
|
}
|
|
594
594
|
|
|
595
595
|
if ([type isEqualToString:@"fullScreen"]) {
|
|
596
|
-
return [
|
|
596
|
+
return [PLYTransition fullScreen];
|
|
597
597
|
} else if ([type isEqualToString:@"modal"]) {
|
|
598
|
-
return [
|
|
598
|
+
return [PLYTransition modalWithDismissible:dismissible];
|
|
599
599
|
} else if ([type isEqualToString:@"push"]) {
|
|
600
|
-
return [
|
|
600
|
+
return [PLYTransition push];
|
|
601
601
|
} else if ([type isEqualToString:@"inlinePaywall"]) {
|
|
602
|
-
return [
|
|
602
|
+
return [PLYTransition inlinePaywall];
|
|
603
603
|
} else if ([type isEqualToString:@"drawer"]) {
|
|
604
|
-
return [[
|
|
604
|
+
return [[PLYTransition alloc] initWithType:PLYTransitionTypeDrawer heightPercentage:heightPercentage backgroundColors:backgroundColors dismissible:dismissible];
|
|
605
605
|
} else if ([type isEqualToString:@"popin"]) {
|
|
606
|
-
return [[
|
|
606
|
+
return [[PLYTransition alloc] initWithType:PLYTransitionTypePopin heightPercentage:heightPercentage backgroundColors:backgroundColors dismissible:dismissible];
|
|
607
607
|
}
|
|
608
608
|
return nil;
|
|
609
609
|
}
|
|
@@ -736,8 +736,8 @@
|
|
|
736
736
|
}
|
|
737
737
|
id<PLYPresentation> presentation = info.presentation;
|
|
738
738
|
if (presentation != nil) {
|
|
739
|
-
if (presentation.
|
|
740
|
-
[infosResult setObject:presentation.
|
|
739
|
+
if (presentation.screenId != nil) {
|
|
740
|
+
[infosResult setObject:presentation.screenId forKey:@"presentationId"];
|
|
741
741
|
}
|
|
742
742
|
if (presentation.placementId != nil) {
|
|
743
743
|
[infosResult setObject:presentation.placementId forKey:@"placementId"];
|
|
@@ -1176,7 +1176,7 @@ static BOOL PLYPresentationActionFromString(NSString *kind, PLYPresentationActio
|
|
|
1176
1176
|
[r setKeepCallbackAsBool:YES];
|
|
1177
1177
|
[strongSelf.commandDelegate sendPluginResult:r callbackId:callbackId];
|
|
1178
1178
|
};
|
|
1179
|
-
presentationLoaded.
|
|
1179
|
+
presentationLoaded.onCloseRequested = ^{
|
|
1180
1180
|
CDVPurchasely *strongSelf = weakSelf; if (strongSelf == nil) return;
|
|
1181
1181
|
CDVPluginResult *r = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:@{@"event": @"closeRequested"}];
|
|
1182
1182
|
[r setKeepCallbackAsBool:YES];
|
|
@@ -1224,7 +1224,7 @@ static BOOL PLYPresentationActionFromString(NSString *kind, PLYPresentationActio
|
|
|
1224
1224
|
|
|
1225
1225
|
- (id<PLYPresentation>) findPresentationLoadedFor:(NSString * _Nullable) presentationId {
|
|
1226
1226
|
for (id<PLYPresentation> presentationLoaded in self.presentationsLoaded) {
|
|
1227
|
-
if ([presentationLoaded.
|
|
1227
|
+
if ([presentationLoaded.screenId isEqualToString: presentationId]) {
|
|
1228
1228
|
return presentationLoaded;
|
|
1229
1229
|
}
|
|
1230
1230
|
}
|
|
@@ -1234,7 +1234,7 @@ static BOOL PLYPresentationActionFromString(NSString *kind, PLYPresentationActio
|
|
|
1234
1234
|
- (NSInteger) findIndexPresentationLoadedFor:(NSString * _Nullable) presentationId {
|
|
1235
1235
|
NSInteger index = 0;
|
|
1236
1236
|
for (id<PLYPresentation> presentationLoaded in self.presentationsLoaded) {
|
|
1237
|
-
if ([presentationLoaded.
|
|
1237
|
+
if ([presentationLoaded.screenId isEqualToString: presentationId]) {
|
|
1238
1238
|
return index;
|
|
1239
1239
|
}
|
|
1240
1240
|
index++;
|
|
@@ -1269,8 +1269,8 @@ static BOOL PLYPresentationActionFromString(NSString *kind, PLYPresentationActio
|
|
|
1269
1269
|
|
|
1270
1270
|
if (presentation != nil) {
|
|
1271
1271
|
|
|
1272
|
-
if (presentation.
|
|
1273
|
-
[presentationResult setObject:presentation.
|
|
1272
|
+
if (presentation.screenId != nil) {
|
|
1273
|
+
[presentationResult setObject:presentation.screenId forKey:@"id"];
|
|
1274
1274
|
}
|
|
1275
1275
|
|
|
1276
1276
|
if (presentation.placementId != nil) {
|
package/www/Purchasely.js
CHANGED
|
@@ -56,7 +56,7 @@ exports.start = function (options, success, error) {
|
|
|
56
56
|
var opts = options || {};
|
|
57
57
|
var cordovaSdkVersion = cordova.define.moduleMap['cordova/plugin_list'].exports['metadata']['cordova-plugin-purchasely']
|
|
58
58
|
if(!cordovaSdkVersion) {
|
|
59
|
-
cordovaSdkVersion = "6.0.0-rc.
|
|
59
|
+
cordovaSdkVersion = "6.0.0-rc.3";
|
|
60
60
|
}
|
|
61
61
|
opts.sdkVersion = cordovaSdkVersion;
|
|
62
62
|
exec(success, error, 'Purchasely', 'start', [opts]);
|