Migrate Adapty iOS SDK to v. 3.4
Adapty SDK 3.4.0 is a major release that introduces improvements that require migration steps on your end.
Update Adapty SDK activation
- Swift
- SwiftUI
// In your AppDelegate class:
import Adapty
let configurationBuilder =
AdaptyConfiguration
.builder(withAPIKey: "PUBLIC_SDK_KEY")
- Adapty.activate(with: configurationBuilder) { error in
+ Adapty.activate(with: configurationBuilder.build()) { error in
// handle the error
}
Update fallback paywall files
Update your fallback paywall files to ensure compatibility with the new SDK version:
- Download the updated fallback paywall files from the Adapty Dashboard.
- Replace the existing fallback paywalls in your mobile app with the new files.
import Adapty
@main
struct SampleApp: App {
init() {
let configurationBuilder =
AdaptyConfiguration
.builder(withAPIKey: "PUBLIC_SDK_KEY")
Task {
- try await Adapty.activate(with: configurationBuilder)
+ try await Adapty.activate(with: configurationBuilder.build())
}
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
Update fallback paywall files
Update your fallback paywall files to ensure compatibility with the new SDK version:
- Download the updated fallback paywall files from the Adapty Dashboard.
- Replace the existing fallback paywalls in your mobile app with the new files.