Skip to content

0.7.0

Compare
Choose a tag to compare
@getsentry-bot getsentry-bot released this 17 May 12:45

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"
  // ...
}

Dependencies