Created
January 10, 2020 21:56
-
-
Save timelincoln7648/d5943afbf330aad38e68437c1c013f79 to your computer and use it in GitHub Desktop.
Install Optimizely Swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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