Skip to content

Commit fb7d676

Browse files
committed
bump cocoa sdk to 8.3.0 and add view hierarchy
1 parent 1897911 commit fb7d676

File tree

9 files changed

+20
-6
lines changed

9 files changed

+20
-6
lines changed

sentry-kotlin-multiplatform/build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ kotlin {
8282
summary = "Official Sentry SDK Kotlin Multiplatform"
8383
homepage = "https://github.com/getsentry/sentry-kotlin-multiplatform"
8484

85-
pod(Config.Libs.sentryCocoa, "~> ${Config.Libs.sentryCocoaVersion}")
85+
pod(Config.Libs.sentryCocoa) {
86+
source = git("https://github.com/getsentry/sentry-cocoa.git") {
87+
tag = Config.Libs.sentryCocoaVersion
88+
}
89+
}
8690

8791
ios.deploymentTarget = Config.Cocoa.iosDeploymentTarget
8892
osx.deploymentTarget = Config.Cocoa.osxDeploymentTarget

sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Pod::Spec.new do |spec|
1212
spec.osx.deployment_target = '10.13'
1313
spec.tvos.deployment_target = '11.0'
1414
spec.watchos.deployment_target = '4.0'
15-
spec.dependency 'Sentry', '~> 8.2.0'
15+
spec.dependency 'Sentry'
1616

1717
spec.pod_target_xcconfig = {
1818
'KOTLIN_PROJECT_PATH' => ':sentry-kotlin-multiplatform',

sentry-kotlin-multiplatform/src/androidMain/kotlin/io/sentry/kotlin/multiplatform/extensions/SentryAndroidOptionsExtensions.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ internal fun SentryOptions.toAndroidSentryOptionsCallback(): (SentryAndroidOptio
1212
it.isAttachScreenshot = this.attachScreenshot
1313
sdk.addPackage(BuildKonfig.SENTRY_ANDROID_PACKAGE_NAME, BuildKonfig.SENTRY_ANDROID_VERSION)
1414
it.sdkVersion = sdk.toJvmSdkVersion()
15+
it.isAttachViewHierarchy = this.attachViewHierarchy
1516
}

sentry-kotlin-multiplatform/src/commonIosMain/kotlin/io/sentry/kotlin/multiplatform/extensions/SentryOptionsExtensions.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ internal fun SentryOptions.toIosOptionsConfiguration(): (CocoaSentryOptions?) ->
99

1010
// Apply iOS specific options
1111
it?.attachScreenshot = this.attachScreenshot
12+
it?.attachViewHierarchy = this.attachViewHierarchy
1213
}

sentry-kotlin-multiplatform/src/commonMain/kotlin/io/sentry/kotlin/multiplatform/SentryOptions.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,7 @@ open class SentryOptions {
6666

6767
/** This variable controls the max attachment size in bytes */
6868
var maxAttachmentSize: Long = 20 * 1024 * 1024
69+
70+
/** Enables or disables the attach view hierarchy feature when an error happened. */
71+
var attachViewHierarchy = false
6972
}

sentry-samples/kmp-app/iosApp/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PODS:
66
- SentryPrivate (= 8.2.0)
77
- SentryPrivate (8.2.0)
88
- shared (1.0):
9-
- Sentry (~> 8.2.0)
9+
- Sentry
1010

1111
DEPENDENCIES:
1212
- shared (from `../shared`)
@@ -23,7 +23,7 @@ EXTERNAL SOURCES:
2323
SPEC CHECKSUMS:
2424
Sentry: cf1d35c866266da58964fe7b62526bda93ffcb38
2525
SentryPrivate: 2909bcc7b19a827b49e9bde0e56116b08d40dfdf
26-
shared: 58db2d6937fef39d8b2c4c237ae769c9fef453f2
26+
shared: 9a8f7e3bffcb968422c4dab15cd0380c58dda99f
2727

2828
PODFILE CHECKSUM: f282da88f39e69507b0a255187c8a6b644477756
2929

sentry-samples/kmp-app/shared/build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ kotlin {
1919
ios.deploymentTarget = "14.1"
2020
podfile = project.file("../iosApp/Podfile")
2121

22-
pod(Config.Libs.sentryCocoa, "~> ${Config.Libs.sentryCocoaVersion}")
22+
pod(Config.Libs.sentryCocoa) {
23+
source = git("https://github.com/getsentry/sentry-cocoa.git") {
24+
tag = Config.Libs.sentryCocoaVersion
25+
}
26+
}
2327

2428
framework {
2529
baseName = "shared"

sentry-samples/kmp-app/shared/shared.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Pod::Spec.new do |spec|
99
spec.vendored_frameworks = 'build/cocoapods/framework/shared.framework'
1010
spec.libraries = 'c++'
1111
spec.ios.deployment_target = '14.1'
12-
spec.dependency 'Sentry', '~> 8.2.0'
12+
spec.dependency 'Sentry'
1313

1414
spec.pod_target_xcconfig = {
1515
'KOTLIN_PROJECT_PATH' => ':sentry-samples:kmp-app:shared',

sentry-samples/kmp-app/shared/src/commonMain/kotlin/sample.kmp.app/AppSetup.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ private fun optionsConfiguration(): OptionsConfiguration {
4343
it.attachStackTrace = true
4444
it.attachThreads = true
4545
it.attachScreenshot = true
46+
it.attachViewHierarchy = true
4647
it.release = "[email protected]"
4748
it.beforeBreadcrumb = { breadcrumb ->
4849
breadcrumb.message = "Add message before every breadcrumb"

0 commit comments

Comments
 (0)