Cocoapods
To install the Kotlin Multiplatform SDK and setup your Apple targets with Cocoapods, you need to add the following to your build.gradle.kts
file in your shared module:
Kotlin Multiplatform requires using version **8.4.0** of the Sentry Cocoa SDK, specifically. Other versions, including newer ones, aren't guaranteed to work.
shared/build.gradle.kts
Copied
repositories {
mavenCentral()
}
kotlin {
iosX64()
iosArm64()
iosSimulatorArm64()
sourceSets {
val commonMain by getting {
dependencies {
implementation("io.sentry:sentry-kotlin-multiplatform:0.2.1")
}
}
// Other targets...
// Apple targets:
val iosMain by getting {
dependsOn(commonMain)
}
cocoapods {
summary = "Some description for the Shared Module"
homepage = "Link to the Shared Module homepage"
ios.deploymentTarget = "14.1"
podfile = project.file("../iosApp/Podfile")
pod("Sentry", "~> 8.4.0")
framework {
baseName = "shared"
}
}
}
}
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) to suggesting an update ("yeah, this would be better").
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) to suggesting an update ("yeah, this would be better").
- Package:
- maven:io.sentry:sentry-kotlin-multiplatform
- Version:
- 0.2.1
- Repository:
- https://github.com/getsentry/sentry-kotlin-multiplatform