Adapty SDK is an open-source framework that makes implementing in-app subscriptions for iOS fast and easy. It’s 100% open-source, native, and lightweight.
- On-the-fly paywalls price testing. Test different prices, duration, offers, messages, and designs simultaneously, all without new app releases.
- Full customer's payment history. Explore the user's payment events from the trial start to subscription cancellation or billing issues.
- In-app purchase data integration. Send subscription events to 3rd-party analytics, attribution, and ad services with no coding, even if the user uninstalls the app.
- No server code implementation. Integrate in-app purchases with server-side receipt validation in minutes. Apple Promotional Offers supported out-of-the-box.
- Advanced analytics. Analyze your app real-time metrics with advanced filters, such as Ad network, Ad campaign, country, A/B test, etc.
Adapty handles everything, from free trials to refunds, in a simple, developer-friendly SDK.
- Free trials, upgrades, downgrades, crossgrades, family sharing, renewals, promo offers, intro offers, promo codes, and more – Adapty SDK does everything with a single line of code.
- Easy subscription management.
- One-time purchases and lifetime subscriptions supported.
- Sync subscribers' states across iOS, Android, and Web.
// Your app’s code
import Adapty
Adapty.activate("YOUR_APP_KEY")
// Make a purchase, Adapty handles the rest
Adapty.makePurchase(product: product) { [weak self] result in
switch result {
case let .success(profile):
// check access level
case let .failure(error):
// handle error
}
}
- 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.
- 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.
- Conversions, trials, revenue, cancellations, and more everything is calculated for you: each paywall and each A/B test.
- Change images, colors, layouts and literally anything with a custom JSON.
- Price testing is seamlessly integrated for any platform.
- Manage the subscription's state without managing transactions.
- 99.5% accuracy with App Store Connect.
- View and analyze data by attributes, such as status, channels, campaigns, and more.
- Filter, group, and measure metrics by attribution, platform, custom users' segments, and more in a few clicks.
This is a demo applications for Adapty. Before running the app, you will need to configure the project.
1. UIKit
2. SwiftUI
Ask questions, participate in discussions about Adapty-related topics, become a part of our community for iOS app developers and marketers. Learn how to monetize your app, ask questions, post jobs, read industry news and analytics. Ad free.
In your AppDelegate
class:
import Adapty
And add the following to application(_:didFinishLaunchingWithOptions:):
Adapty.activate("PUBLIC_SDK_KEY", customerUserId: "YOUR_USER_ID")
The Adapty iOS SDK allows you to remotely configure the products that will be displayed in your app. This way you don't have to hardcode the products and can dynamically change offers or run A/B tests without having to release a new version of the app.
To fetch the paywall, you have to call .getPaywall()
method:
Adapty.getPaywall("YOUR_PAYWALL_ID") { result in
switch result {
case let .success(paywall):
// the requested paywall
case let .failure(error):
// handle the error
}
}
Once you have the paywall, you can query the product array that corresponds to it:
Adapty.getPaywallProducts(paywall: paywall) { result in
switch result {
case let .success(products):
// the requested products array
case let .failure(error):
// handle the error
}
}
To make the purchase, you have to call .makePurchase()
method:
let product = products.first
Adapty.makePurchase(product: product) { result in
switch result {
case let .success(profile):
// successful purchase
case let .failure(error):
// handle the error
}
}
5. Getting info about the user subscription status and granting access to the premium features of the app
With the Adapty iOS App SDK you don't have to hardcode product IDs to check the subscription status. You just have to verify that the user has an active access level. To do this, you have to call .getProfile()
method:
Adapty.getProfile { result in
if let profile = try? result.get(),
profile.accessLevels["premium"]?.isActive ?? false {
// grant access to premium features
}
}
Adapty creates an internal profile ID for every user. But if you have your own authentification system, you should set your own Customer User ID. You can find the users by the Customer User ID in Profiles. It can be used in the server-side API and then sent to all integrations.
Adapty SDK supports AppsFlyer, Adjust, Branch, Facebook Ads, and Apple Search Ads.
You can set optional attributes such as email, phone number, etc, to the user of your app. You can then use attributes to create user segments or just view them in CRM.
Adapty sends all subscription events to analytical services, such as Amplitude, Mixpanel, and AppMetrica.
10. Error Handling
11. SDK Models
- Feel free to open an issue, we check all of them or drop us an email at support@adapty.io and tell us everything you want.
- Want to suggest a feature? Just contact us or open an issue in the repo.
So do we! Feel free to star the repo ⭐️⭐️⭐️ and make our developers happy!
Adapty is available under the MIT license. Click here for details.