Skip to main content

Migrating from iOS v1

FlyyFramework 3.x is the v2 iOS SDK under the same pod and module name. import FlyyFramework and #import "FlyyFramework/FlyyFramework.h" keep compiling, and every v1 @objc method exists with the same selector, labels and callback shape.

:::note Why 3.x? CocoaPods trunk already holds v1 releases up to 2.0.5, so the v2 SDK starts at 3.0.0. :::

1. Bump the pod​

Podfile
platform :ios, '14.0' # was 11/12/13

pod 'FlyyFramework', '~> 3.0'
pod install --repo-update

2. Keep your code​

Flyy.sharedInstance.initSDK(partnerToken: key, environment: Flyy.sharedInstance.production())
Flyy.sharedInstance.setUser(externalUserId: "user-123") { ok in }
Flyy.sharedInstance.openFlyyOffersPage(navigationController: navigationController!)
Flyy.sharedInstance.delegate = self // FlyySDKClosedListener and friends
[[Flyy sharedFlyyInstance] openFlyyOffersPageWithNavigationController:self.navigationController];

v1 methods can be called from any thread; they hop to the main thread.

3. Check push​

If you passed the APNs device token to the v1 SDK, switch to the FCM registration token — see Push. FCM rejects APNs tokens.

Optional: adopt the v2 API​

Flyy.initialize(FlyyConfig(partnerId: key, environment: .production))
Flyy.setUser("user-123")
Flyy.open(from: self)

What's new for iOS apps​