@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.
- package/AdaptyCapacitor.podspec +3 -3
- package/Package.swift +1 -1
- package/README.md +45 -29
- package/android/build.gradle +4 -3
- package/android/src/main/kotlin/com/adapty/plugin/capacitor/AdaptyCapacitorImplementation.kt +2 -0
- package/dist/esm/adapty.d.ts +752 -6
- package/dist/esm/adapty.js +755 -8
- package/dist/esm/adapty.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/shared/coders/adapty-configuration.js +25 -14
- package/dist/esm/shared/coders/adapty-configuration.js.map +1 -1
- package/dist/esm/shared/coders/adapty-identify-params.d.ts +11 -0
- package/dist/esm/shared/coders/adapty-identify-params.js +19 -0
- package/dist/esm/shared/coders/adapty-identify-params.js.map +1 -0
- package/dist/esm/shared/coders/adapty-paywall-product.d.ts +1 -1
- package/dist/esm/shared/coders/adapty-paywall-product.js +12 -0
- package/dist/esm/shared/coders/adapty-paywall-product.js.map +1 -1
- package/dist/esm/shared/coders/adapty-purchase-params.js +0 -8
- package/dist/esm/shared/coders/adapty-purchase-params.js.map +1 -1
- package/dist/esm/shared/coders/adapty-purchase-result.js +18 -2
- package/dist/esm/shared/coders/adapty-purchase-result.js.map +1 -1
- package/dist/esm/shared/coders/adapty-ui-create-onboarding-view-params.d.ts +8 -0
- package/dist/esm/shared/coders/adapty-ui-create-onboarding-view-params.js +10 -0
- package/dist/esm/shared/coders/adapty-ui-create-onboarding-view-params.js.map +1 -0
- package/dist/esm/shared/coders/adapty-ui-create-paywall-view-params.d.ts +18 -0
- package/dist/esm/shared/coders/adapty-ui-create-paywall-view-params.js +142 -0
- package/dist/esm/shared/coders/adapty-ui-create-paywall-view-params.js.map +1 -0
- package/dist/esm/shared/coders/parse-onboarding.d.ts +3 -0
- package/dist/esm/shared/coders/parse-onboarding.js +86 -0
- package/dist/esm/shared/coders/parse-onboarding.js.map +1 -0
- package/dist/esm/shared/coders/parse-paywall.d.ts +4 -0
- package/dist/esm/shared/coders/parse-paywall.js +141 -0
- package/dist/esm/shared/coders/parse-paywall.js.map +1 -0
- package/dist/esm/shared/coders/parse.d.ts +0 -2
- package/dist/esm/shared/coders/parse.js +0 -75
- package/dist/esm/shared/coders/parse.js.map +1 -1
- package/dist/esm/shared/coders/product-reference.js +10 -0
- package/dist/esm/shared/coders/product-reference.js.map +1 -1
- package/dist/esm/shared/coders/utils.d.ts +18 -0
- package/dist/esm/shared/coders/utils.js +50 -0
- package/dist/esm/shared/coders/utils.js.map +1 -0
- package/dist/esm/shared/types/index.d.ts +16 -0
- package/dist/esm/shared/types/index.js +5 -0
- package/dist/esm/shared/types/index.js.map +1 -1
- package/dist/esm/shared/types/inputs.d.ts +47 -14
- package/dist/esm/shared/types/inputs.js.map +1 -1
- package/dist/esm/shared/types/onboarding-events.d.ts +60 -0
- package/dist/esm/shared/types/onboarding-events.js +11 -0
- package/dist/esm/shared/types/onboarding-events.js.map +1 -0
- package/dist/esm/shared/types/paywall-events.d.ts +84 -0
- package/dist/esm/shared/types/paywall-events.js +16 -0
- package/dist/esm/shared/types/paywall-events.js.map +1 -0
- package/dist/esm/shared/utils/platform.d.ts +2 -0
- package/dist/esm/shared/utils/platform.js +5 -0
- package/dist/esm/shared/utils/platform.js.map +1 -0
- package/dist/esm/types/adapty-plugin.d.ts +2 -1
- package/dist/esm/types/adapty-plugin.js.map +1 -1
- package/dist/esm/ui-builder/base-view-emitter.d.ts +14 -20
- package/dist/esm/ui-builder/base-view-emitter.js +95 -73
- package/dist/esm/ui-builder/base-view-emitter.js.map +1 -1
- package/dist/esm/ui-builder/create-onboarding-view.d.ts +32 -0
- package/dist/esm/ui-builder/create-onboarding-view.js +36 -0
- package/dist/esm/ui-builder/create-onboarding-view.js.map +1 -0
- package/dist/esm/ui-builder/create-paywall-view.d.ts +25 -0
- package/dist/esm/ui-builder/create-paywall-view.js +29 -0
- package/dist/esm/ui-builder/create-paywall-view.js.map +1 -0
- package/dist/esm/ui-builder/index.d.ts +6 -37
- package/dist/esm/ui-builder/index.js +4 -41
- package/dist/esm/ui-builder/index.js.map +1 -1
- package/dist/esm/ui-builder/onboarding-view-controller.d.ts +103 -17
- package/dist/esm/ui-builder/onboarding-view-controller.js +112 -22
- package/dist/esm/ui-builder/onboarding-view-controller.js.map +1 -1
- package/dist/esm/ui-builder/onboarding-view-emitter.d.ts +10 -24
- package/dist/esm/ui-builder/onboarding-view-emitter.js +49 -56
- package/dist/esm/ui-builder/onboarding-view-emitter.js.map +1 -1
- package/dist/esm/ui-builder/paywall-view-controller.d.ts +130 -30
- package/dist/esm/ui-builder/paywall-view-controller.js +141 -71
- package/dist/esm/ui-builder/paywall-view-controller.js.map +1 -1
- package/dist/esm/ui-builder/paywall-view-emitter.d.ts +8 -28
- package/dist/esm/ui-builder/paywall-view-emitter.js +86 -118
- package/dist/esm/ui-builder/paywall-view-emitter.js.map +1 -1
- package/dist/esm/ui-builder/types.d.ts +89 -4
- package/dist/esm/ui-builder/types.js +3 -3
- package/dist/esm/ui-builder/types.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/plugin.cjs.js +1896 -556
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +1896 -556
- package/dist/plugin.js.map +1 -1
- package/package.json +2 -2
package/AdaptyCapacitor.podspec
CHANGED
|
@@ -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.
|
|
16
|
-
s.dependency 'AdaptyUI', '3.
|
|
17
|
-
s.dependency 'AdaptyPlugin', '3.
|
|
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.
|
|
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
|

|
|
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
|
|
30
|
-
- [
|
|
31
|
-
- [
|
|
32
|
-
- [
|
|
33
|
-
- [
|
|
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-
|
|
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
|
-
|
|
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
|
-
##
|
|
72
|
+
## Design paywalls in the no-code builder
|
|
50
73
|
|
|
51
|
-
-
|
|
52
|
-
|
|
74
|
+

|
|
75
|
+
|
|
76
|
+
With Adapty, you can create a complete, purchase-ready paywall in the no-code builder.
|
|
53
77
|
|
|
54
|
-
|
|
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
|

|
|
57
83
|
|
|
58
|
-
- Conversions, trials, revenue, cancellations, and more
|
|
59
|
-
- Change images, colors, layouts and literally anything
|
|
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 more — everything 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
|
|
87
|
+
## Real-time analytics for your Capacitor app
|
|
63
88
|
|
|
64
89
|

|
|
65
90
|
|
|
66
91
|
- Manage the subscription's state without managing transactions.
|
|
67
|
-
- 99.5% accuracy
|
|
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
|
|
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
|
|
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:
|
package/android/build.gradle
CHANGED
|
@@ -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:
|
|
65
|
-
implementation 'io.adapty:android-
|
|
66
|
-
implementation 'io.adapty
|
|
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"
|
package/android/src/main/kotlin/com/adapty/plugin/capacitor/AdaptyCapacitorImplementation.kt
CHANGED
|
@@ -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 {
|