@purchasely/cordova-plugin-purchasely 6.0.0-rc.3 → 6.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/README.md +22 -14
- package/__tests__/Purchasely.test.js +820 -155
- package/example/IOS_8_1_1_TEST_MATRIX.md +25 -0
- package/example/e2e/README.md +2 -2
- package/example/e2e/helpers/driver.js +135 -18
- package/example/e2e/specs/bridge.e2e.js +116 -13
- package/example/e2e/specs/dismiss.e2e.js +32 -12
- package/example/e2e/tools/ci_run_e2e.sh +15 -1
- package/example/e2e/tools/ci_run_e2e_ios.sh +12 -2
- package/example/e2e/wdio.android.conf.js +3 -0
- package/example/e2e/wdio.ios.conf.js +26 -1
- package/example/ios.sh +6 -5
- package/example/package-lock.json +3 -3
- package/example/package.json +2 -2
- package/example/www/js/index.js +62 -58
- package/package.json +1 -1
- package/plugin.xml +3 -3
- package/src/android/PurchaselyPlugin.kt +247 -67
- package/src/ios/CDVPurchasely+Events.m +7 -1
- package/src/ios/CDVPurchasely.h +11 -0
- package/src/ios/CDVPurchasely.m +158 -6
- package/src/ios/Hybrid/PLYPlan+Hybrid.m +19 -0
- package/src/ios/Hybrid/PLYSubscription+Hybrid.m +13 -0
- package/www/Purchasely.js +390 -46
package/README.md
CHANGED
|
@@ -29,24 +29,32 @@ Purchasely.start(
|
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
31
|
|
|
32
|
-
Purchasely.
|
|
33
|
-
'
|
|
34
|
-
'my_content_id'
|
|
35
|
-
|
|
36
|
-
(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
Purchasely.presentation
|
|
33
|
+
.placement('my_placement_id') // or .screen('my_presentation_id'), .defaultSource()
|
|
34
|
+
.contentId('my_content_id') // may be omitted
|
|
35
|
+
.build()
|
|
36
|
+
.display(Purchasely.TransitionType.fullScreen) // display mode
|
|
37
|
+
.then((outcome) => {
|
|
38
|
+
console.log(outcome);
|
|
39
|
+
if (outcome.purchaseResult === 'purchased') {
|
|
40
|
+
console.log("User purchased " + outcome.plan.name);
|
|
41
|
+
} else if (outcome.purchaseResult === 'cancelled') {
|
|
42
|
+
console.log("User cancelled purchase");
|
|
40
43
|
} else {
|
|
41
|
-
console.log("
|
|
44
|
+
console.log("Dismissed", outcome.closeReason);
|
|
42
45
|
}
|
|
43
|
-
}
|
|
44
|
-
(error) => {
|
|
45
|
-
console.log("Error with purchase : " + error);
|
|
46
|
-
}
|
|
47
|
-
);
|
|
46
|
+
});
|
|
48
47
|
```
|
|
49
48
|
|
|
49
|
+
## Limitations
|
|
50
|
+
|
|
51
|
+
- **No inline/embedded paywall view.** iOS, Android, Flutter and React Native all support
|
|
52
|
+
embedding a paywall directly inside a screen (`PLYPresentationView` / `buildView` /
|
|
53
|
+
`getFragment`). This is not available on Cordova: the plugin only supports
|
|
54
|
+
modal/fullscreen/push presentation via the presentation builder
|
|
55
|
+
(`Purchasely.presentation.…build().display()`). Embedding a native view inside the WebView
|
|
56
|
+
isn't supported by this bridge architecture; this is an accepted platform limitation, not a bug.
|
|
57
|
+
|
|
50
58
|
## 🏁 Documentation
|
|
51
59
|
|
|
52
60
|
A complete documentation is available on our website [https://docs.purchasely.com](https://docs.purchasely.com/quick-start/sdk-installation/cordova)
|