Skip to main content

Getting Started

To integrate the DP SDK into your mobile application, follow these steps:

1. Create a host app client

To obtain your clientId, please contact us.

2. Install the SDK

Install the Dragonpass Hybrid SDK for your target platform.

For detailed installation instructions, see:

3. Initialize the SDK

iOS

Swift
import DPSDKKit

DPSDK.start(clientId: "<client_id>")

Android

Kotlin
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
DPSDK.init(this).setDPSdkConfig(
DPSDKConfig.Builder()
.setClientId("<client_id>")
.build()
)
}
}

Register MyApplication in AndroidManifest.xml:

XML
<application
android:name=".MyApplication"
...>

4. Set the auth code

After obtaining the auth code from the Connect flow, pass it to the SDK:

iOS

Swift
DPSDK.shared.setAuthCode(token: "xxx")

Android

Kotlin
DPSDK.setAuthCode("xxx")

5. Open a DPApp

iOS

Swift
DPSDK.open(appId: "<app_id>", from: self)

Android

Kotlin
DPSDK.getDPApp("<app_id>").open(this)

Next Steps