Skip to main content
Skip table of contents

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

}


feedback-img.png

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.