-
Notifications
You must be signed in to change notification settings - Fork 0
Initializing the SDK
ForstaMobileApp edited this page Sep 9, 2022
·
1 revision
To use the SDK in your app, you must initialize it. This only has to be done once.
Because the SDK requires Application, the recommended place to initialize the SDK will be onCreate on application subclass:
NOTE: The SDK is fully built with Kotlin. You will see more Kotlin Interop classes / functions during implementation. Check more detail on Kotlin Interop.
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
ConfirmitSDK.Setup(this).configure()
// Initialize server with received Client ID and Client Secret keys
ConfirmitServer.configureUK("<Client ID>", "<Client Secret>")
}
}If you create your own application subclass, you must add it to the app’s AndroidManifest.xml:
<application
android:name=".MyApplication"
...
/>Recommended place to initialize SDK will be application(_:didFinishLaunchingWithOptions:) on AppDelegate class.
import MobileSurveySdk
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
...
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
...
ConfirmitSDK.Setup().configure()
// Initialize server with received Client ID and Client Secret keys
try! ConfirmitServer.configureUK(clientId: "<Client ID>", clientSecret: "<Client Secret>")
return true
}
}Copyright © 2026 Forsta. All rights reserved.
- Initializing the SDK
- Download a Program
- Sending App Events
- Sending Journey Log
- Survey Triggering
- Displaying a Survey
- Forsta Plus Server
- Program Lifecycle Monitoring
- Starting and Updating a Program
- Advanced Trigger Control