Skip to content

Commit 8b4cab0

Browse files
buenaflorgetsentry-botmarandaneto
authored
feat: view hierarchy (#53)
* bump cocoa sdk to 8.3.0 and add view hierarchy * feat(craft): kmp configuration in .craft.yml (#54) * add kmp configuration to .craft.yml * change minVersion to 1.2.0 * release: 0.0.1-alpha.2 * bump craft minVersion to 1.2.1 (#55) * change to cocoapods as source * chore: update readme (#56) * update sdk version * update cocoa version * add updateReadme task * Format code * surround with trycatch when reading the file * Format code * update podspec * use latest placeholder and track cocoa version manually * remove updateReadme from format workflow * re-add make format * replace placeholder * update readme * Update sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec * Update .github/workflows/format.yml --------- Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io> Co-authored-by: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> * update sentry cocoa version in README * update pospec and changelog * bump cocoa version to 8.4.0 and use attachViewHierarchy on Android --------- Co-authored-by: getsentry-bot <bot@sentry.io> Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io> Co-authored-by: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com>
1 parent d5ecbdf commit 8b4cab0

File tree

10 files changed

+24
-14
lines changed

10 files changed

+24
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Features
66

77
- Improve Objc/Swift experience with @HiddenFromObjc ([#62](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/62))
8+
- feat: add view hierarchy ([#53](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/53))
89

910
### Fixes
1011

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ cocoapods {
5959
// ...
6060
6161
// Make sure Sentry Cocoa in your project matches this version
62-
pod("Sentry", "~> 8.2.0")
62+
pod("Sentry", "~> 8.4.0")
6363
6464
framework {
6565
baseName = "shared"

buildSrc/src/main/java/Config.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ object Config {
2727
val sentryAndroid = "io.sentry:sentry-android:$sentryJavaVersion"
2828
val sentryJava = "io.sentry:sentry:$sentryJavaVersion"
2929

30-
val sentryCocoaVersion = "8.2.0"
30+
val sentryCocoaVersion = "8.4.0"
3131
val sentryCocoa = "Sentry"
3232
}
3333

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', '~> 8.4.0'
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
@@ -10,6 +10,7 @@ internal fun SentryOptions.toAndroidSentryOptionsCallback(): (SentryAndroidOptio
1010

1111
// Apply Android specific options
1212
it.isAttachScreenshot = this.attachScreenshot
13+
it.isAttachViewHierarchy = this.attachViewHierarchy
1314

1415
it.sdkVersion?.name = this.sdk?.name ?: BuildKonfig.SENTRY_KMP_ANDROID_SDK_NAME
1516
it.sdkVersion?.version = this.sdk?.version ?: BuildKonfig.VERSION_NAME

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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,10 @@ public open class SentryOptions {
6666

6767
/** This variable controls the max attachment size in bytes */
6868
public var maxAttachmentSize: Long = 20 * 1024 * 1024
69+
70+
/**
71+
* Enables or disables the attach view hierarchy feature when an error happened.
72+
* This is only available on iOS and Android.
73+
*/
74+
public var attachViewHierarchy: Boolean = false
6975
}

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
PODS:
2-
- Sentry (8.2.0):
3-
- Sentry/Core (= 8.2.0)
4-
- SentryPrivate (= 8.2.0)
5-
- Sentry/Core (8.2.0):
6-
- SentryPrivate (= 8.2.0)
7-
- SentryPrivate (8.2.0)
2+
- Sentry (8.4.0):
3+
- Sentry/Core (= 8.4.0)
4+
- SentryPrivate (= 8.4.0)
5+
- Sentry/Core (8.4.0):
6+
- SentryPrivate (= 8.4.0)
7+
- SentryPrivate (8.4.0)
88
- shared (1.0):
9-
- Sentry (~> 8.2.0)
9+
- Sentry (~> 8.4.0)
1010

1111
DEPENDENCIES:
1212
- shared (from `../shared`)
@@ -21,9 +21,9 @@ EXTERNAL SOURCES:
2121
:path: "../shared"
2222

2323
SPEC CHECKSUMS:
24-
Sentry: cf1d35c866266da58964fe7b62526bda93ffcb38
25-
SentryPrivate: 2909bcc7b19a827b49e9bde0e56116b08d40dfdf
26-
shared: 58db2d6937fef39d8b2c4c237ae769c9fef453f2
24+
Sentry: 16d46dd5ca10e7f4469a2611805a3de123188add
25+
SentryPrivate: 2bb4f8d9ff558b25ac70b66c1dedc58a7c43630b
26+
shared: 0dca2e824df822c0e0186869c320e4ba675f23ed
2727

2828
PODFILE CHECKSUM: f282da88f39e69507b0a255187c8a6b644477756
2929

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', '~> 8.4.0'
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 = "kmp-release@0.0.1"
4748
it.beforeBreadcrumb = { breadcrumb ->
4849
breadcrumb.message = "Add message before every breadcrumb"

0 commit comments

Comments
 (0)