@adapty/capacitor 3.11.1-beta.0 → 3.15.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.
Files changed (93) hide show
  1. package/AdaptyCapacitor.podspec +3 -3
  2. package/Package.swift +1 -1
  3. package/README.md +45 -29
  4. package/android/build.gradle +4 -3
  5. package/android/src/main/kotlin/com/adapty/plugin/capacitor/AdaptyCapacitorImplementation.kt +2 -0
  6. package/dist/esm/adapty.d.ts +752 -6
  7. package/dist/esm/adapty.js +755 -8
  8. package/dist/esm/adapty.js.map +1 -1
  9. package/dist/esm/index.d.ts +2 -1
  10. package/dist/esm/index.js.map +1 -1
  11. package/dist/esm/shared/coders/adapty-configuration.js +25 -14
  12. package/dist/esm/shared/coders/adapty-configuration.js.map +1 -1
  13. package/dist/esm/shared/coders/adapty-identify-params.d.ts +11 -0
  14. package/dist/esm/shared/coders/adapty-identify-params.js +19 -0
  15. package/dist/esm/shared/coders/adapty-identify-params.js.map +1 -0
  16. package/dist/esm/shared/coders/adapty-paywall-product.d.ts +1 -1
  17. package/dist/esm/shared/coders/adapty-paywall-product.js +12 -0
  18. package/dist/esm/shared/coders/adapty-paywall-product.js.map +1 -1
  19. package/dist/esm/shared/coders/adapty-purchase-params.js +0 -8
  20. package/dist/esm/shared/coders/adapty-purchase-params.js.map +1 -1
  21. package/dist/esm/shared/coders/adapty-purchase-result.js +18 -2
  22. package/dist/esm/shared/coders/adapty-purchase-result.js.map +1 -1
  23. package/dist/esm/shared/coders/adapty-ui-create-onboarding-view-params.d.ts +8 -0
  24. package/dist/esm/shared/coders/adapty-ui-create-onboarding-view-params.js +10 -0
  25. package/dist/esm/shared/coders/adapty-ui-create-onboarding-view-params.js.map +1 -0
  26. package/dist/esm/shared/coders/adapty-ui-create-paywall-view-params.d.ts +18 -0
  27. package/dist/esm/shared/coders/adapty-ui-create-paywall-view-params.js +142 -0
  28. package/dist/esm/shared/coders/adapty-ui-create-paywall-view-params.js.map +1 -0
  29. package/dist/esm/shared/coders/parse-onboarding.d.ts +3 -0
  30. package/dist/esm/shared/coders/parse-onboarding.js +86 -0
  31. package/dist/esm/shared/coders/parse-onboarding.js.map +1 -0
  32. package/dist/esm/shared/coders/parse-paywall.d.ts +4 -0
  33. package/dist/esm/shared/coders/parse-paywall.js +141 -0
  34. package/dist/esm/shared/coders/parse-paywall.js.map +1 -0
  35. package/dist/esm/shared/coders/parse.d.ts +0 -2
  36. package/dist/esm/shared/coders/parse.js +0 -75
  37. package/dist/esm/shared/coders/parse.js.map +1 -1
  38. package/dist/esm/shared/coders/product-reference.js +10 -0
  39. package/dist/esm/shared/coders/product-reference.js.map +1 -1
  40. package/dist/esm/shared/coders/utils.d.ts +18 -0
  41. package/dist/esm/shared/coders/utils.js +50 -0
  42. package/dist/esm/shared/coders/utils.js.map +1 -0
  43. package/dist/esm/shared/types/index.d.ts +16 -0
  44. package/dist/esm/shared/types/index.js +5 -0
  45. package/dist/esm/shared/types/index.js.map +1 -1
  46. package/dist/esm/shared/types/inputs.d.ts +47 -14
  47. package/dist/esm/shared/types/inputs.js.map +1 -1
  48. package/dist/esm/shared/types/onboarding-events.d.ts +60 -0
  49. package/dist/esm/shared/types/onboarding-events.js +11 -0
  50. package/dist/esm/shared/types/onboarding-events.js.map +1 -0
  51. package/dist/esm/shared/types/paywall-events.d.ts +84 -0
  52. package/dist/esm/shared/types/paywall-events.js +16 -0
  53. package/dist/esm/shared/types/paywall-events.js.map +1 -0
  54. package/dist/esm/shared/utils/platform.d.ts +2 -0
  55. package/dist/esm/shared/utils/platform.js +5 -0
  56. package/dist/esm/shared/utils/platform.js.map +1 -0
  57. package/dist/esm/types/adapty-plugin.d.ts +2 -1
  58. package/dist/esm/types/adapty-plugin.js.map +1 -1
  59. package/dist/esm/ui-builder/base-view-emitter.d.ts +14 -20
  60. package/dist/esm/ui-builder/base-view-emitter.js +95 -73
  61. package/dist/esm/ui-builder/base-view-emitter.js.map +1 -1
  62. package/dist/esm/ui-builder/create-onboarding-view.d.ts +32 -0
  63. package/dist/esm/ui-builder/create-onboarding-view.js +36 -0
  64. package/dist/esm/ui-builder/create-onboarding-view.js.map +1 -0
  65. package/dist/esm/ui-builder/create-paywall-view.d.ts +25 -0
  66. package/dist/esm/ui-builder/create-paywall-view.js +29 -0
  67. package/dist/esm/ui-builder/create-paywall-view.js.map +1 -0
  68. package/dist/esm/ui-builder/index.d.ts +6 -37
  69. package/dist/esm/ui-builder/index.js +4 -41
  70. package/dist/esm/ui-builder/index.js.map +1 -1
  71. package/dist/esm/ui-builder/onboarding-view-controller.d.ts +103 -17
  72. package/dist/esm/ui-builder/onboarding-view-controller.js +112 -22
  73. package/dist/esm/ui-builder/onboarding-view-controller.js.map +1 -1
  74. package/dist/esm/ui-builder/onboarding-view-emitter.d.ts +10 -24
  75. package/dist/esm/ui-builder/onboarding-view-emitter.js +49 -56
  76. package/dist/esm/ui-builder/onboarding-view-emitter.js.map +1 -1
  77. package/dist/esm/ui-builder/paywall-view-controller.d.ts +130 -30
  78. package/dist/esm/ui-builder/paywall-view-controller.js +141 -71
  79. package/dist/esm/ui-builder/paywall-view-controller.js.map +1 -1
  80. package/dist/esm/ui-builder/paywall-view-emitter.d.ts +8 -28
  81. package/dist/esm/ui-builder/paywall-view-emitter.js +86 -118
  82. package/dist/esm/ui-builder/paywall-view-emitter.js.map +1 -1
  83. package/dist/esm/ui-builder/types.d.ts +89 -4
  84. package/dist/esm/ui-builder/types.js +3 -3
  85. package/dist/esm/ui-builder/types.js.map +1 -1
  86. package/dist/esm/version.d.ts +1 -1
  87. package/dist/esm/version.js +1 -1
  88. package/dist/esm/version.js.map +1 -1
  89. package/dist/plugin.cjs.js +1896 -556
  90. package/dist/plugin.cjs.js.map +1 -1
  91. package/dist/plugin.js +1896 -556
  92. package/dist/plugin.js.map +1 -1
  93. package/package.json +2 -2
@@ -12,8 +12,8 @@ Pod::Spec.new do |s|
12
12
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
13
  s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
14
14
  s.dependency 'Capacitor'
15
- s.dependency 'Adapty', '3.11.0'
16
- s.dependency 'AdaptyUI', '3.11.0'
17
- s.dependency 'AdaptyPlugin', '3.11.0'
15
+ s.dependency 'Adapty', '3.15.3'
16
+ s.dependency 'AdaptyUI', '3.15.3'
17
+ s.dependency 'AdaptyPlugin', '3.15.3'
18
18
  s.swift_version = '5.1'
19
19
  end
package/Package.swift CHANGED
@@ -11,7 +11,7 @@ let package = Package(
11
11
  ],
12
12
  dependencies: [
13
13
  .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0"),
14
- .package(url: "https://github.com/adaptyteam/AdaptySDK-iOS.git", exact: "3.11.0")
14
+ .package(url: "https://github.com/adaptyteam/AdaptySDK-iOS.git", exact: "3.15.3")
15
15
  ],
16
16
  targets: [
17
17
  .target(
package/README.md CHANGED
@@ -23,21 +23,44 @@
23
23
  ![Adapty: CRM for mobile apps with subscriptions](https://adapty-portal-media-production.s3.amazonaws.com/github/adapty-schema.png)
24
24
 
25
25
  Adapty SDK is an open-source framework that makes implementing in-app subscriptions for Capacitor fast and easy. It's 100% open-source and lightweight.
26
+ ## Table of Contents
27
+ - [Why Adapty?](#why-adapty)
28
+ - [Getting Started](#getting-started)
29
+ - [Integrate IAPs within a few hours without server coding](#integrate-iaps-within-a-few-hours-without-server-coding)
30
+ - [Design paywalls in the no-code builder](#design-paywalls-in-the-no-code-builder)
31
+ - [Test paywalls & prices on Capacitor without app releases](#test-paywalls--prices-on-capacitor-without-app-releases)
32
+ - [Real-time analytics for your Capacitor app](#real-time-analytics-for-your-capacitor-app)
33
+ - [Mobile app monetization's largest community](#mobile-app-monetizations-largest-community)
34
+ - [Platform Support](#platform-support)
35
+ - [Examples](#examples)
36
+ - [Contributing](#contributing)
37
+ - [Like Adapty SDK?](#like-adapty-sdk)
38
+ - [License](#license)
26
39
 
27
40
  ## Why Adapty?
28
41
 
29
- - [No-code paywall builder](https://adapty.io/paywall-builder/?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Capacitor). Create and edit conversion-optimized paywalls in minutes with native-rendered UI (not WebView). Apply changes in real-time without app releases.
30
- - [On-the-fly paywalls price testing](https://adapty.io/docs/ab-tests/?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Capacitor). Test different prices, duration, offers, messages, and designs simultaneously, all without new app releases.
31
- - [Full customer's payment history](https://adapty.io/docs/profiles-crm/?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Capacitor). Explore the user's payment events from the trial start to subscription cancellation or billing issues.
32
- - [In-app purchase data integration](https://adapty.io/docs/event-feed/?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Capacitor). Send subscription events to 3rd-party analytics, attribution, and ad services with no coding, even if the user uninstalls the app.
33
- - [Advanced analytics](https://adapty.io/docs/analytics-charts/?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Capacitor). Analyze your app real-time metrics with advanced filters, such as Ad network, Ad campaign, country, A/B test, etc.
42
+ - [No server code implementation](https://adapty.io/docs/sdk-installation-capacitor?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Capacitor). Integrate in-app purchases with server-side receipt validation in minutes in your own paywall or one created in the no-code builder.
43
+ - [No-code paywall builder](https://adapty.io/docs/adapty-paywall-builder?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Capacitor). Create a beautiful, natively rendered paywall in the no-code editor and display it in your app to start getting paid instantly.
44
+ - [On-the-fly paywalls price testing](https://docs.adapty.io/v3.0/docs/ab-tests?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Capacitor). Test different prices, duration, offers, messages, and designs simultaneously, all without new app releases.
45
+ - [Beautiful onboardings](https://adapty.io/docs/onboardings?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Capacitor). Design onboardings in the no-code editor and guide users through their first app experience.
46
+ - [Full customer's payment history](https://docs.adapty.io/v3.0/docs/profiles-crm?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Capacitor). Explore the user's payment events from the trial start to subscription cancellation or billing issues.
47
+ - [3rd-party integrations](https://docs.adapty.io/v3.0/docs/events?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Capacitor). Send subscription events to 3rd-party analytics, attribution, and ad services with no coding, even if the user uninstalls the app.
48
+ - [Advanced analytics](https://docs.adapty.io/v3.0/docs/charts?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Capacitor). Analyze your app real-time metrics with advanced filters, such as Ad network, Ad campaign, country, A/B test, etc.
34
49
 
35
50
  <h3 align="center" style="border-bottom: none; margin-top: -15px; margin-bottom: -15px; font-size: 150%">
36
- <a href="https://adapty.io/schedule-demo?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Capacitor_schedule-demo">Talk to Us to Learn More</a>
51
+ <a href="https://adapty.io/schedule-demo?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Unity_schedule-demo">Talk to Us to Learn More</a>
37
52
  </h3>
38
53
 
54
+ ## Getting Started
55
+
56
+ ```sh
57
+ npm install @adapty/capacitor
58
+ npx cap sync
59
+ ```
39
60
 
40
- ## Integrate IAPs Within a Few Hours Without Server Coding
61
+ Follow our [quickstart guide](https://adapty.io/docs/sdk-installation-capacitor/?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Capacitor) to install and configure Adapty SDK. Set up purchases in hours instead of weeks :rocket:
62
+
63
+ ## Integrate IAPs within a few hours without server coding
41
64
 
42
65
  **Adapty handles everything, from free trials to refunds, in a simple, developer-friendly SDK.**
43
66
 
@@ -46,48 +69,41 @@ Adapty SDK is an open-source framework that makes implementing in-app subscripti
46
69
  - One-time purchases and lifetime subscriptions supported.
47
70
  - Sync subscribers' states across iOS, Android, and Web.
48
71
 
49
- ## Price Testing for In-app Purchases on Capacitor Without App Releases
72
+ ## Design paywalls in the no-code builder
50
73
 
51
- - Optimize in-app subscriptions with the paywall A/B testing. Conversions, trials, revenue, cancellations, and more — everything is calculated for you: each paywall and each A/B test.
52
- - Change images, colors, layouts, and literally anything with a custom JSON. Configure different prices, trial periods, promo offers, and more in Adapty without app releases.
74
+ ![No-code builder](https://adapty.io/assets/uploads/2024/09/img-builder-and-templates@2x.webp)
75
+
76
+ With Adapty, you can create a complete, purchase-ready paywall in the no-code builder.
53
77
 
54
- ## Paywall A/B Testing on Capacitor
78
+ Adapty automatically renders it and handles all the complex purchase flow, receipt validation, and subscription management behind the scenes.
79
+
80
+ ## Test paywalls & prices on Capacitor without app releases
55
81
 
56
82
  ![Adapty: In-app subscriptions with paywall A/B testing](https://adapty-portal-media-production.s3.amazonaws.com/github/ab-test-new.png)
57
83
 
58
- - Conversions, trials, revenue, cancellations, and more everything is calculated for you: each paywall and each A/B test.
59
- - Change images, colors, layouts and literally anything with a custom JSON.
60
- - Price testing is seamlessly integrated for any platform.
84
+ - Optimize in-app subscriptions with the paywall A/B testing. Conversions, trials, revenue, cancellations, and moreeverything is calculated for you: each paywall and each A/B test.
85
+ - Change images, colors, layouts, and literally anything using the no-code builder or a custom JSON. Configure different prices, trial periods, promo offers, and more in Adapty without app releases.
61
86
 
62
- ## Real-time Analytics for Your Capacitor App
87
+ ## Real-time analytics for your Capacitor app
63
88
 
64
89
  ![Adapty: How Adapty works](https://adapty-portal-media-production.s3.amazonaws.com/github/analyticss.gif)
65
90
 
66
91
  - Manage the subscription's state without managing transactions.
67
- - 99.5% accuracy with App Store Connect.
92
+ - 99.5% accuracy.
68
93
  - View and analyze data by attributes, such as status, channels, campaigns, and more.
69
94
  - Filter, group, and measure metrics by attribution, platform, custom users' segments, and more in a few clicks.
70
95
 
71
- ## Mobile App Monetization's Largest Community
96
+ ## Mobile app monetization's largest community
72
97
 
73
- Ask questions, participate in discussions about Adapty-related topics, become a part of our community for mobile app developers and marketers. Learn how to monetize your app, ask questions, post jobs, read industry news and analytics. Ad free.
98
+ Ask questions, participate in discussions about Adapty-related topics, become a part of our community for app developers and marketers. Learn how to monetize your app, ask questions, post jobs, read industry news and analytics. Ad free.
74
99
 
75
100
  <a href="https://discord.gg/subscriptions-hub"><img src="https://adapty-portal-media-production.s3.amazonaws.com/github/join-discord.svg" /></a>
76
101
 
77
-
78
- ## Getting Started
79
-
80
- ```sh
81
- npm install @adapty/capacitor
82
- npx cap sync
83
- ```
84
-
85
- Read the [documentation](https://adapty.io/docs/sdk-installation-capacitor/?utm_source=github&utm_medium=referral&utm_campaign=AdaptySDK-Capacitor) to install and configure Adapty SDK. Set up purchases in hours instead of weeks :rocket:
86
-
87
- ### Platform Support
102
+ ## Platform Support
88
103
 
89
104
  Adapty SDK for Capacitor is fully supported on **iOS** and **Android** platforms. Web platform is not supported—the build will succeed, but SDK methods will throw `CapacitorException` instead of performing actual operations.
90
105
 
106
+
91
107
  ## Examples
92
108
 
93
109
  We provide example applications demonstrating Adapty SDK integration:
@@ -61,9 +61,10 @@ dependencies {
61
61
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
62
62
 
63
63
  // Adapty SDK dependencies
64
- implementation 'io.adapty:android-sdk:3.11.1'
65
- implementation 'io.adapty:android-ui:3.11.1'
66
- implementation 'io.adapty.internal:crossplatform:3.11.4'
64
+ implementation platform('io.adapty:adapty-bom:3.15.2')
65
+ implementation 'io.adapty:android-sdk'
66
+ implementation 'io.adapty:android-ui'
67
+ implementation 'io.adapty.internal:crossplatform:3.15.6'
67
68
 
68
69
  testImplementation "junit:junit:$junitVersion"
69
70
  androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
@@ -23,6 +23,8 @@ class AdaptyCapacitorImplementation {
23
23
  this.eventCallback?.invoke(eventName, eventData ?: "")
24
24
  },
25
25
  { value -> FileLocation.extract(context, value) },
26
+ // Use the same activity to prevent android from stopping javascript execution in background webview
27
+ true
26
28
  )
27
29
 
28
30
  crossplatformHelper.setActivity {