0.7.0
Features
- Allow initializing the KMP SDK with native options (#221)
- This allows you to initialize the SDK with platform-specific options that may not be available in the common code of the KMP SDK yet.
Usage:
// build.gradle.kts
kotlin {
sourceSets {
all {
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
}
}
// commonMain
fun init() {
Sentry.initWithPlatformOptions(platformOptionsConfiguration())
}
expect fun platformOptionsConfiguration(): PlatformOptionsConfiguration
// iOS
actual fun platformOptionsConfiguration(): PlatformOptionsConfiguration = {
dsn = "your_dsn"
release = "1.0.0"
// ...
}
// Android
actual fun platformOptionsConfiguration(): PlatformOptionsConfiguration = {
dsn = "your_dsn"
release = "1.0.0"
// ...
}