Initialize SDK: using Swift
Import Dropthought SDK
The first step to using SDK using Swift is importing. Use the below code snippet to import Dropthought SDK.
CODE
import Dropthought
Initialize SDK
Use the below code snippet to initialize SDK. Follow the steps on the Fetching API Key from your Dropthought Account to get the API key.
In AppDelegate.swift
CODE
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Add this line to our SDK
Dropthought.instance().init(launchOptions, apiKey: "YOUR_API_KEY")
// ...
return true
}
Learn more: Add new app | Associate a program
