Swiftpack.co - adaptyteam/AdaptySDK-iOS as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by adaptyteam.
adaptyteam/AdaptySDK-iOS 1.18.0-beta.3
iOS SDK for growing mobile in-app purchases
⭐️ 408
🕓 2 weeks ago
iOS macOS
.package(url: "https://github.com/adaptyteam/AdaptySDK-iOS.git", from: "1.18.0-beta.3")


Easy In-App Purchases Integration to
Make Your iOS App Profitable

Adapty: CRM for mobile apps with subscriptions

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.

Why Adapty?

  • 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.

Talk to Us to Learn More

Integrate IAPs Within a Few Hours Without Server Coding

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>, offerId: <offerid>) { (receipt, response, error) in
    if error == nil {
       // successful purchase
    }
}

Price Testing for In-app Purchases on iOS Without App Releases

  • 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.

Paywall A/B Testing on iOS

Adapty: In-app subscriptions with 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.
  • Price testing is seamlessly integrated for any platform.

Real-time Analytics for Your iOS App

Adapty: How Adapty works

  • 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.

Examples of Adapty-Demo apps

This is a demo applications for Adapty. Before running the app, you will need to configure the project.

1. UIKit

2. SwiftUI

Adapty: An example of the paywall is changed on the fly

Mobile App Monetization's Largest Community

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.

Getting Started

1. Installing the iOS SDK via CocoaPods or Swift Package Manager

2. Importing, configuring, and setting up the logging

In your AppDelegate class:

import Adapty

And add the following to application(_:didFinishLaunchingWithOptions:):

Adapty.activate("PUBLIC_SDK_KEY", customerUserId: "YOUR_USER_ID")

3. Fetching and displaying products for paywalls in your app

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 products, you have to call .getPaywalls() method:

Adapty.getPaywalls(forceUpdate: Bool) { (paywalls, products, error) in
    if error == nil {
       // retrieve the products from paywalls
   }
}

4. Making and restoring mobile purchases

To make the purchase, you have to call .makePurchase() method:

Adapty.makePurchase(product: <product>, offerId: <offerid>) { ( purchaseInfo, receipt, appleValidationResult, product, error) in
    if error == nil {
       // successful purchase
   }
}

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 .getPurchaserInfo() method:

Adapty.getPurchaseInfo(forceUpdate: Bool) { ( purchaseInfo, error) in
    if error == nil {
       // check the access
   }
}

6. Identifying the users of your app

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.

7. Attribution Integration

Adapty SDK supports AppsFlyer, Adjust, Branch, Facebook Ads, and Apple Search Ads.

8. Setting User Attributes

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.

9. Analytics Integration

Adapty sends all subscription events to analytical services, such as Amplitude, Mixpanel, and AppMetrica.

10. Error Handling (SKError, NSError, Error)

11. SDK Models

Contributing

  • Feel free to open an issue, we check all of them or drop us an email at [email protected] and tell us everything you want.
  • Want to suggest a feature? Just contact us or open an issue in the repo.

Like Adapty SDK?

So do we! Feel free to star the repo ⭐️⭐️⭐️ and make our developers happy!

License

Adapty is available under the MIT license. Click here for details.

GitHub

link
Stars: 408
Last commit: 2 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

1.18.0-beta.3
2 weeks ago

1.18.0-beta.3 changes:

  • fixed errors handling in case of server is unreachable

1.18.0-beta.2 changes:

  • added logShowOnboarding event

1.18.0-beta.1 changes:

  • The forceUpdate parameter was removed from the getPaywall method. The result will always be up to date if it is possible to retrieve data from the server;
  • developerId field is renamed to id in PaywallModel;
  • Improved the logic of Fallback Paywalls;
  • Added ability to get customAttributes in PurchaserModel;

1.18.0-beta changes:

  • The getPaywalls method is deleted for the sake of improving system performance, now you should use the getPaywall(_ id: String ...) function instead;
  • Since this update we are no longer support Visual Paywalls and Promo Campaigns features, so you should remove the calls to the corresponding methods, if there were any;
  • Optimized some of the analytics calls;
  • We have updated our sample applications to make it clearer how to use our SDK

⚠️ Please contact the Adapty team via technical support before using this beta version.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics