Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Optimizely Swift
import UIKit
import Optimizely
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
// Build OptimizelyClient
let optimizely = OptimizelyClient(sdkKey: "REPLACE_WITH_SDK_KEY", periodicDownloadInterval: 30)
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
optimizely.start { result in
switch result {
case .failure(let error):
print("Optimizely SDK initiliazation failed: \(error)")
case .success:
print("Optimizely SDK initialized successfully!")
}
}
return true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment