@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 CHANGED
@@ -29,24 +29,32 @@ Purchasely.start(
29
29
  }
30
30
  );
31
31
 
32
- Purchasely.presentPresentationWithIdentifier(
33
- 'my_presentation_id', // may be null
34
- 'my_content_id', // may be null
35
- Purchasely.TransitionType.fullScreen, // display mode
36
- (callback) => {
37
- console.log(callback);
38
- if(callback.result == Purchasely.PurchaseResult.CANCELLED) {
39
- console.log("User cancelled purchased");
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("User purchased " + callback.plan.name);
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)