- iOS 9.0+
- Xcode 10.2+
You can also use Adapty SDK in Swift and Objective-C applications.
- Create a Podfile if you don't have one:
pod init
- Add Adapty to your Podfile:
pod 'Adapty', '~> 1.9.0'
- Save the file and run:
pod install
. This creates an.xcworkspace
file for your app. Use this file for all future development on your application.
- In Xcode go to
File
>Swift Packages
>Add Package Dependency...
- Enter
https://github.com/adaptyteam/AdaptySDK-iOS.git
- Choose a version and click
Next
and Xcode will add the package dependency to your project.
In your AppDelegate class:
import Adapty
And add the following to application(_:didFinishLaunchingWithOptions:)
:
Adapty.activate("PUBLIC_SDK_KEY", customerUserId: "YOUR_USER_ID")
If your app doesn't have user IDs, you can use .activate("PUBLIC_SDK_KEY")
or pass nil for the customerUserId
. Anyway, you can update customerUserId
later within .identify()
request.
Adapty will log errors and other important information to help you understand what is going on. There are three levels available: verbose
, errors
and none
in case you want a bit of a silence.
You can set this immediately in your app while testing, before you configure Adapty.
Adapty.logLevel = .verbose
To get up and running with subscriptions and Adapty SDK follow our Advanced usage section.
Adapty is available under the MIT license. See LICENSE for details.