Skip to content

Commit e414d72

Browse files
Merge pull request #25 from adaptyteam/dev
Merge dev to master
2 parents 32a4405 + 4a1c888 commit e414d72

34 files changed

+1676
-142
lines changed

AdaptyCapacitor.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Pod::Spec.new do |s|
1212
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
1313
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
1414
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.12.1'
16+
s.dependency 'AdaptyUI', '3.12.1'
17+
s.dependency 'AdaptyPlugin', '3.12.1'
1818
s.swift_version = '5.1'
1919
end

CHANGELOG.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,94 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7+
## [3.12.0-beta.1]
8+
9+
### Added
10+
11+
- Support for Local Access Levels, allowing the SDK to verify purchases directly with the store even when Adapty servers are unreachable. [Read More.](http://adapty.io/docs/local-access-levels)
12+
- Support for StoreKit Testing in Xcode. [Read More.](http://adapty.io/docs/local-sk-files)
13+
- **Customer Identity Parameters**: New identity parameters support in `activate()` and `identify()` methods
14+
- **iOS**: `appAccountToken` parameter for App Store customer identification
15+
- **Android**: `obfuscatedAccountId` parameter for Google Play customer identification
16+
- **Android**: `pendingPrepaidPlansEnabled` parameter to enable pending prepaid plans support
17+
18+
- **Product Information Enhancement**: Added new fields to products
19+
- `accessLevelId` field in `ProductReference`
20+
- `productType` field in `ProductReference`
21+
- `accessLevelId` field in `AdaptyPaywallProduct`
22+
- `productType` field in `AdaptyPaywallProduct`
23+
24+
- **Purchase Transaction Data**: Platform-specific transaction information in purchase results
25+
- **iOS**: `jwsTransaction` (JSON Web Signature) in successful purchase results
26+
- **Android**: `purchaseToken` (Google Play purchase token) in successful purchase results
27+
28+
- iOS presentation styles support: added `iosPresentationStyle` parameter (`'full_screen'` (default) | `'page_sheet'`) to `present()` methods in paywall and onboarding view controllers
29+
```typescript
30+
// Before (still supported)
31+
await paywallView.present();
32+
33+
// New (with presentation style)
34+
await paywallView.present({ iosPresentationStyle: 'page_sheet' });
35+
```
36+
37+
### Changed
38+
39+
- **Native iOS SDK**: Updated to version 3.12.1
40+
- **Native Android SDK**: Updated to version 3.12.1
41+
42+
- **identify() method signature**: Now accepts an options object with optional identity parameters
43+
```typescript
44+
// Before (still supported)
45+
await adapty.identify({ customerUserId: 'user_123' });
46+
47+
// New (with identity parameters)
48+
await adapty.identify({
49+
customerUserId: 'user_123',
50+
params: {
51+
ios: { appAccountToken: 'uuid-string' },
52+
android: { obfuscatedAccountId: 'obfuscated-id' }
53+
}
54+
});
55+
```
56+
57+
58+
### Removed
59+
60+
- **BREAKING CHANGE**: Removed deprecated fields from `AdaptyAndroidPurchaseParams`
61+
- `obfuscatedAccountId` - use `activate()` or `identify()` with `android.obfuscatedAccountId` instead
62+
- `obfuscatedProfileId` - no longer supported
63+
64+
**Migration guide:**
65+
```typescript
66+
// BEFORE (v3.11.x) - No longer works
67+
await adapty.makePurchase({
68+
product,
69+
android: {
70+
obfuscatedAccountId: 'account-id',
71+
obfuscatedProfileId: 'profile-id'
72+
}
73+
});
74+
75+
// AFTER (v3.12.0) - Set during activation
76+
await adapty.activate({
77+
apiKey: 'your-key',
78+
params: {
79+
android: {
80+
obfuscatedAccountId: 'account-id'
81+
}
82+
}
83+
});
84+
await adapty.makePurchase({
85+
product
86+
});
87+
```
88+
89+
## [3.11.1-beta.0]
90+
91+
### Fixed
92+
93+
- **Android**: Fixed `dismiss()` method in `AdaptyOnboardingViewController` not working properly.
94+
795
## [3.11.0-beta.0]
896

997
### Removed ⚠️ BREAKING CHANGES

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let package = Package(
1111
],
1212
dependencies: [
1313
.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.12.1")
1515
],
1616
targets: [
1717
.target(

README.md

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,19 @@ Adapty SDK is an open-source framework that makes implementing in-app subscripti
2626

2727
## Why Adapty?
2828

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.
29+
- [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.
30+
- [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.
31+
- [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.
32+
- [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.
33+
- [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.
34+
- [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.
35+
- [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.
3436

3537
<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>
38+
<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>
3739
</h3>
3840

39-
40-
## Integrate IAPs Within a Few Hours Without Server Coding
41+
## Integrate IAPs within a few hours without server coding
4142

4243
**Adapty handles everything, from free trials to refunds, in a simple, developer-friendly SDK.**
4344

@@ -46,31 +47,33 @@ Adapty SDK is an open-source framework that makes implementing in-app subscripti
4647
- One-time purchases and lifetime subscriptions supported.
4748
- Sync subscribers' states across iOS, Android, and Web.
4849

49-
## Price Testing for In-app Purchases on Capacitor Without App Releases
50+
## Design paywalls in the no-code builder
5051

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.
52+
![No-code builder](https://adapty.io/assets/uploads/2024/09/[email protected])
53+
54+
With Adapty, you can create a complete, purchase-ready paywall in the no-code builder.
5355

54-
## Paywall A/B Testing on Capacitor
56+
Adapty automatically renders it and handles all the complex purchase flow, receipt validation, and subscription management behind the scenes.
57+
58+
## Test paywalls & prices on Capacitor without app releases
5559

5660
![Adapty: In-app subscriptions with paywall A/B testing](https://adapty-portal-media-production.s3.amazonaws.com/github/ab-test-new.png)
5761

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.
62+
- 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.
63+
- 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.
6164

62-
## Real-time Analytics for Your Capacitor App
65+
## Real-time analytics for your Capacitor app
6366

6467
![Adapty: How Adapty works](https://adapty-portal-media-production.s3.amazonaws.com/github/analyticss.gif)
6568

6669
- Manage the subscription's state without managing transactions.
67-
- 99.5% accuracy with App Store Connect.
70+
- 99.5% accuracy.
6871
- View and analyze data by attributes, such as status, channels, campaigns, and more.
6972
- Filter, group, and measure metrics by attribution, platform, custom users' segments, and more in a few clicks.
7073

71-
## Mobile App Monetization's Largest Community
74+
## Mobile app monetization's largest community
7275

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.
76+
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.
7477

7578
<a href="https://discord.gg/subscriptions-hub"><img src="https://adapty-portal-media-production.s3.amazonaws.com/github/join-discord.svg" /></a>
7679

@@ -82,7 +85,7 @@ npm install @adapty/capacitor
8285
npx cap sync
8386
```
8487

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:
88+
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:
8689

8790
### Platform Support
8891

android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ dependencies {
6161
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
6262

6363
// 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 'io.adapty:android-sdk:3.12.1'
65+
implementation 'io.adapty:android-ui:3.12.0'
66+
implementation 'io.adapty.internal:crossplatform:3.12.0'
6767

6868
testImplementation "junit:junit:$junitVersion"
6969
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"

cross_platform.yaml

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
$schema: "https://json-schema.org/draft/2020-12/schema"
2-
$id: "https://adapty.io/crossPlatform/3.11.0/schema"
2+
$id: "https://adapty.io/crossPlatform/3.12.0/schema"
33
title: "Cross Platform Format"
44

55
$requests:
@@ -112,6 +112,7 @@ $requests:
112112
properties:
113113
method: { const: "adapty_ui_present_onboarding_view" }
114114
id: { type: string, description: "View Id" }
115+
ios_presentation_style: { $ref: "#/$defs/AdaptyUI.IOSPresentationStyle" }
115116

116117
AdaptyUIPresentOnboardingView.Response: #response
117118
type: object
@@ -130,6 +131,7 @@ $requests:
130131
properties:
131132
method: { const: "adapty_ui_present_paywall_view" }
132133
id: { type: string, description: "View Id" }
134+
ios_presentation_style: { $ref: "#/$defs/AdaptyUI.IOSPresentationStyle" }
133135

134136
AdaptyUIPresentPaywallView.Response: #response
135137
type: object
@@ -288,7 +290,7 @@ $requests:
288290
properties:
289291
method: { const: "identify" }
290292
customer_user_id: { type: string }
291-
app_account_token: { $ref: "#/$defs/UUID" }
293+
parameters: { $ref: "#/$defs/CustomerIdentityParameters" }
292294

293295
Identify.Response: #response
294296
type: object
@@ -505,7 +507,7 @@ $requests:
505507
error: { $ref: "#/$defs/AdaptyError" }
506508
- required: [success]
507509
properties:
508-
success: { $ref: "#/$defs/AdaptyProfile" }
510+
success: { const: true }
509511

510512
### restorePurchases ###
511513
RestorePurchases.Request: #request
@@ -924,7 +926,7 @@ $defs:
924926
type: string
925927
format: uuid
926928
pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
927-
description: "UUID in RFC 4122"
929+
description: "UUID in RFC 4122 format"
928930
example: "123e4567-e89b-12d3-a456-426614174000"
929931

930932
Date: #response #request
@@ -937,10 +939,11 @@ $defs:
937939
properties:
938940
api_key: { type: string }
939941
customer_user_id: { type: string }
940-
app_account_token: { $ref: "#/$defs/UUID" , description: "used only if customer_user_id is not null"}
942+
customer_identity_parameters: { $ref: "#/$defs/CustomerIdentityParameters" }
941943
observer_mode: { type: boolean, default: false }
942944
apple_idfa_collection_disabled: { type: boolean, default: false }
943945
google_adid_collection_disabled: { type: boolean, default: false }
946+
google_enable_pending_prepaid_plans: { type: boolean, default: false }
944947
ip_address_collection_disabled: { type: boolean, default: false }
945948
server_cluster: { type: string, enum: ["default", "eu", "cn"] }
946949
backend_base_url: { type: string }
@@ -961,11 +964,20 @@ $defs:
961964
memory_storage_count_limit: { type: integer }
962965
disk_storage_size_limit: { type: integer, description: "bytes" }
963966

967+
CustomerIdentityParameters: #request
968+
type: object
969+
properties:
970+
app_account_token: { $ref: "#/$defs/UUID", description: "iOS Only" }
971+
obfuscated_account_id: { type: string, description: "Android Only" }
972+
obfuscated_profile_id: { type: string, description: "Android Only" }
973+
964974
AdaptyPaywallProduct.Response: #response
965975
type: object
966976
required:
967977
- vendor_product_id
968978
- adapty_product_id
979+
- access_level_id
980+
- product_type
969981
- paywall_product_index
970982
- paywall_variation_id
971983
- paywall_ab_test_name
@@ -977,6 +989,8 @@ $defs:
977989
properties:
978990
vendor_product_id: { type: string }
979991
adapty_product_id: { type: string }
992+
access_level_id: { type: string }
993+
product_type: { type: string }
980994
paywall_product_index: { type: integer }
981995
paywall_variation_id: { type: string }
982996
paywall_ab_test_name: { type: string }
@@ -1026,13 +1040,17 @@ $defs:
10261040
required:
10271041
- vendor_product_id
10281042
- adapty_product_id
1043+
- access_level_id
1044+
- product_type
10291045
- paywall_product_index
10301046
- paywall_variation_id
10311047
- paywall_ab_test_name
10321048
- paywall_name
10331049
properties:
10341050
vendor_product_id: { type: string }
10351051
adapty_product_id: { type: string }
1052+
access_level_id: { type: string }
1053+
product_type: { type: string }
10361054
paywall_product_index: { type: integer }
10371055
subscription_offer_identifier:
10381056
{ $ref: "#/$defs/AdaptySubscriptionOffer.Identifier" }
@@ -1179,9 +1197,13 @@ $defs:
11791197
required:
11801198
- vendor_product_id
11811199
- adapty_product_id
1200+
- access_level_id
1201+
- product_type
11821202
properties:
11831203
vendor_product_id: { type: string }
11841204
adapty_product_id: { type: string }
1205+
access_level_id: { type: string }
1206+
product_type: { type: string }
11851207
promotional_offer_id: { type: string, description: "iOS Only" }
11861208
win_back_offer_id: { type: string, description: "iOS Only" }
11871209
base_plan_id: { type: string, description: "Android Only" }
@@ -1397,6 +1419,8 @@ $defs:
13971419
type: { type: string, const: "success" }
13981420
profile: { $ref: "#/$defs/AdaptyProfile" }
13991421
jws_transaction: { type: string }
1422+
google_purchase_token: { type: string }
1423+
14001424

14011425
AdaptyInstallationStatus: #response #event
14021426
type: object
@@ -1480,6 +1504,12 @@ $defs:
14801504
nullable: false
14811505
}
14821506

1507+
AdaptyUI.IOSPresentationStyle:
1508+
type: string
1509+
enum:
1510+
- full_screen
1511+
- page_sheet
1512+
14831513
AdaptyUI.DialogConfiguration: #request
14841514
type: object
14851515
required: [default_action]
@@ -1495,7 +1525,7 @@ $defs:
14951525
- primary
14961526
- secondary
14971527

1498-
AdaptyPurchaseParameters: #request
1528+
AdaptyPurchaseParameters: #request
14991529
type: object
15001530
properties:
15011531
subscription_update_params:
@@ -1504,8 +1534,6 @@ $defs:
15041534
description: "Android Only",
15051535
}
15061536
is_offer_personalized: { type: boolean, description: "Android Only" }
1507-
obfuscated_account_id: { type: string, description: "Android Only" }
1508-
obfuscated_profile_id: { type: string, description: "Android Only" }
15091537

15101538

15111539
AdaptySubscriptionUpdateParameters: #request # Android Only

examples/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Examples
2+
3+
We provide example applications demonstrating Adapty SDK integration with different frameworks and use cases.
4+
5+
### Basic Examples
6+
7+
Minimal applications showing core SDK functionality (activation, paywalls, purchases). Perfect for getting started and understanding the basic integration flow.
8+
9+
- **[React Example](./basic-react-example/)** - React application with hooks and functional components
10+
- **[Angular Example](./basic-angular-example/)** - Angular application with components and services
11+
- **[Vue Example](./basic-vue-example/)** - Vue 3 application with Composition API
12+
13+
Each basic example demonstrates:
14+
- SDK activation and configuration
15+
- Displaying free and premium content
16+
- Showing paywall for premium content access
17+
- Making purchases through Paywall Builder
18+
- Automatic access to premium content after successful purchase
19+
20+
### Adapty Devtools
21+
22+
**Adapty Devtools** - Advanced development tool for bug reports and SDK testing. This comprehensive example includes detailed logging, debug panels, and testing utilities for developers working on SDK integration or reporting issues.

0 commit comments

Comments
 (0)