From fb7d67661d53aa797684744976ab9722907708da Mon Sep 17 00:00:00 2001 From: Giancarlo Buenaflor Date: Fri, 10 Mar 2023 14:04:26 +0100 Subject: [PATCH 01/10] bump cocoa sdk to 8.3.0 and add view hierarchy --- sentry-kotlin-multiplatform/build.gradle.kts | 6 +++++- .../sentry_kotlin_multiplatform.podspec | 2 +- .../extensions/SentryAndroidOptionsExtensions.kt | 1 + .../multiplatform/extensions/SentryOptionsExtensions.kt | 1 + .../kotlin/io/sentry/kotlin/multiplatform/SentryOptions.kt | 3 +++ sentry-samples/kmp-app/iosApp/Podfile.lock | 4 ++-- sentry-samples/kmp-app/shared/build.gradle.kts | 6 +++++- sentry-samples/kmp-app/shared/shared.podspec | 2 +- .../shared/src/commonMain/kotlin/sample.kmp.app/AppSetup.kt | 1 + 9 files changed, 20 insertions(+), 6 deletions(-) diff --git a/sentry-kotlin-multiplatform/build.gradle.kts b/sentry-kotlin-multiplatform/build.gradle.kts index 093a562f..5cd76fbf 100644 --- a/sentry-kotlin-multiplatform/build.gradle.kts +++ b/sentry-kotlin-multiplatform/build.gradle.kts @@ -82,7 +82,11 @@ kotlin { summary = "Official Sentry SDK Kotlin Multiplatform" homepage = "https://github.com/getsentry/sentry-kotlin-multiplatform" - pod(Config.Libs.sentryCocoa, "~> ${Config.Libs.sentryCocoaVersion}") + pod(Config.Libs.sentryCocoa) { + source = git("https://github.com/getsentry/sentry-cocoa.git") { + tag = Config.Libs.sentryCocoaVersion + } + } ios.deploymentTarget = Config.Cocoa.iosDeploymentTarget osx.deploymentTarget = Config.Cocoa.osxDeploymentTarget diff --git a/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec b/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec index e76009dc..8691b4a0 100644 --- a/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec +++ b/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec @@ -12,7 +12,7 @@ Pod::Spec.new do |spec| spec.osx.deployment_target = '10.13' spec.tvos.deployment_target = '11.0' spec.watchos.deployment_target = '4.0' - spec.dependency 'Sentry', '~> 8.2.0' + spec.dependency 'Sentry' spec.pod_target_xcconfig = { 'KOTLIN_PROJECT_PATH' => ':sentry-kotlin-multiplatform', diff --git a/sentry-kotlin-multiplatform/src/androidMain/kotlin/io/sentry/kotlin/multiplatform/extensions/SentryAndroidOptionsExtensions.kt b/sentry-kotlin-multiplatform/src/androidMain/kotlin/io/sentry/kotlin/multiplatform/extensions/SentryAndroidOptionsExtensions.kt index 6ab883f6..2664b439 100644 --- a/sentry-kotlin-multiplatform/src/androidMain/kotlin/io/sentry/kotlin/multiplatform/extensions/SentryAndroidOptionsExtensions.kt +++ b/sentry-kotlin-multiplatform/src/androidMain/kotlin/io/sentry/kotlin/multiplatform/extensions/SentryAndroidOptionsExtensions.kt @@ -12,4 +12,5 @@ internal fun SentryOptions.toAndroidSentryOptionsCallback(): (SentryAndroidOptio it.isAttachScreenshot = this.attachScreenshot sdk.addPackage(BuildKonfig.SENTRY_ANDROID_PACKAGE_NAME, BuildKonfig.SENTRY_ANDROID_VERSION) it.sdkVersion = sdk.toJvmSdkVersion() + it.isAttachViewHierarchy = this.attachViewHierarchy } diff --git a/sentry-kotlin-multiplatform/src/commonIosMain/kotlin/io/sentry/kotlin/multiplatform/extensions/SentryOptionsExtensions.kt b/sentry-kotlin-multiplatform/src/commonIosMain/kotlin/io/sentry/kotlin/multiplatform/extensions/SentryOptionsExtensions.kt index 8bc62899..bb7638d1 100644 --- a/sentry-kotlin-multiplatform/src/commonIosMain/kotlin/io/sentry/kotlin/multiplatform/extensions/SentryOptionsExtensions.kt +++ b/sentry-kotlin-multiplatform/src/commonIosMain/kotlin/io/sentry/kotlin/multiplatform/extensions/SentryOptionsExtensions.kt @@ -9,4 +9,5 @@ internal fun SentryOptions.toIosOptionsConfiguration(): (CocoaSentryOptions?) -> // Apply iOS specific options it?.attachScreenshot = this.attachScreenshot + it?.attachViewHierarchy = this.attachViewHierarchy } diff --git a/sentry-kotlin-multiplatform/src/commonMain/kotlin/io/sentry/kotlin/multiplatform/SentryOptions.kt b/sentry-kotlin-multiplatform/src/commonMain/kotlin/io/sentry/kotlin/multiplatform/SentryOptions.kt index 68f017cd..457ac0f2 100644 --- a/sentry-kotlin-multiplatform/src/commonMain/kotlin/io/sentry/kotlin/multiplatform/SentryOptions.kt +++ b/sentry-kotlin-multiplatform/src/commonMain/kotlin/io/sentry/kotlin/multiplatform/SentryOptions.kt @@ -66,4 +66,7 @@ open class SentryOptions { /** This variable controls the max attachment size in bytes */ var maxAttachmentSize: Long = 20 * 1024 * 1024 + + /** Enables or disables the attach view hierarchy feature when an error happened. */ + var attachViewHierarchy = false } diff --git a/sentry-samples/kmp-app/iosApp/Podfile.lock b/sentry-samples/kmp-app/iosApp/Podfile.lock index 4c553878..1829cdfb 100644 --- a/sentry-samples/kmp-app/iosApp/Podfile.lock +++ b/sentry-samples/kmp-app/iosApp/Podfile.lock @@ -6,7 +6,7 @@ PODS: - SentryPrivate (= 8.2.0) - SentryPrivate (8.2.0) - shared (1.0): - - Sentry (~> 8.2.0) + - Sentry DEPENDENCIES: - shared (from `../shared`) @@ -23,7 +23,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Sentry: cf1d35c866266da58964fe7b62526bda93ffcb38 SentryPrivate: 2909bcc7b19a827b49e9bde0e56116b08d40dfdf - shared: 58db2d6937fef39d8b2c4c237ae769c9fef453f2 + shared: 9a8f7e3bffcb968422c4dab15cd0380c58dda99f PODFILE CHECKSUM: f282da88f39e69507b0a255187c8a6b644477756 diff --git a/sentry-samples/kmp-app/shared/build.gradle.kts b/sentry-samples/kmp-app/shared/build.gradle.kts index 32f9922a..760436a2 100644 --- a/sentry-samples/kmp-app/shared/build.gradle.kts +++ b/sentry-samples/kmp-app/shared/build.gradle.kts @@ -19,7 +19,11 @@ kotlin { ios.deploymentTarget = "14.1" podfile = project.file("../iosApp/Podfile") - pod(Config.Libs.sentryCocoa, "~> ${Config.Libs.sentryCocoaVersion}") + pod(Config.Libs.sentryCocoa) { + source = git("https://github.com/getsentry/sentry-cocoa.git") { + tag = Config.Libs.sentryCocoaVersion + } + } framework { baseName = "shared" diff --git a/sentry-samples/kmp-app/shared/shared.podspec b/sentry-samples/kmp-app/shared/shared.podspec index 8f9d4acc..279064f1 100644 --- a/sentry-samples/kmp-app/shared/shared.podspec +++ b/sentry-samples/kmp-app/shared/shared.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |spec| spec.vendored_frameworks = 'build/cocoapods/framework/shared.framework' spec.libraries = 'c++' spec.ios.deployment_target = '14.1' - spec.dependency 'Sentry', '~> 8.2.0' + spec.dependency 'Sentry' spec.pod_target_xcconfig = { 'KOTLIN_PROJECT_PATH' => ':sentry-samples:kmp-app:shared', diff --git a/sentry-samples/kmp-app/shared/src/commonMain/kotlin/sample.kmp.app/AppSetup.kt b/sentry-samples/kmp-app/shared/src/commonMain/kotlin/sample.kmp.app/AppSetup.kt index 10c5030c..37e05517 100644 --- a/sentry-samples/kmp-app/shared/src/commonMain/kotlin/sample.kmp.app/AppSetup.kt +++ b/sentry-samples/kmp-app/shared/src/commonMain/kotlin/sample.kmp.app/AppSetup.kt @@ -43,6 +43,7 @@ private fun optionsConfiguration(): OptionsConfiguration { it.attachStackTrace = true it.attachThreads = true it.attachScreenshot = true + it.attachViewHierarchy = true it.release = "kmp-release@0.0.1" it.beforeBreadcrumb = { breadcrumb -> breadcrumb.message = "Add message before every breadcrumb" From 6917ae6bb2b6c56f344f68b307199b754fc2700b Mon Sep 17 00:00:00 2001 From: Giancarlo Buenaflor Date: Mon, 13 Mar 2023 10:42:06 +0100 Subject: [PATCH 02/10] feat(craft): kmp configuration in .craft.yml (#54) * add kmp configuration to .craft.yml * change minVersion to 1.2.0 --- .craft.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.craft.yml b/.craft.yml index a9a47bae..edac7bdb 100644 --- a/.craft.yml +++ b/.craft.yml @@ -1,4 +1,4 @@ -minVersion: 0.33.2 +minVersion: 1.2.0 changelogPolicy: auto targets: - name: maven @@ -11,6 +11,9 @@ targets: distDirRegex: /^(sentry-android-|.*-android).*$/ fileReplaceeRegex: /\d\.\d\.\d(-\w+(\.\d)?)?(-SNAPSHOT)?/ fileReplacerStr: release.aar + kmp: + rootDistDirRegex: /^(?!.*(?:jvm|android|ios|watchos|tvos|macos)).*$/ + appleDistDirRegex: /(ios|watchos|tvos|macos)/ - name: github - name: registry sdks: From 09aa1804632971cdf13371b46af044fee447d978 Mon Sep 17 00:00:00 2001 From: getsentry-bot Date: Tue, 14 Mar 2023 13:02:41 +0000 Subject: [PATCH 03/10] release: 0.0.1-alpha.2 --- CHANGELOG.md | 3 ++- gradle.properties | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9caccff1..bbf32bf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Unreleased +## 0.0.1-alpha.2 ### Features @@ -15,3 +15,4 @@ - Screenshots option for Android and iOS - Add beforeBreadcrumb hook - Kotlin Multiplatform Sample project + diff --git a/gradle.properties b/gradle.properties index e1ce4fdd..f89dc08d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,7 +12,7 @@ compose.version=1.3.1-rc01 jvm.version=1.8 # Release information -versionName=0.0.1 +versionName=0.0.1-alpha.2 # Increase memory for in-process compiler execution. org.gradle.jvmargs=-Xmx3g From 08ab40f0387205e28a221fefa586cdb2241941f9 Mon Sep 17 00:00:00 2001 From: Giancarlo Buenaflor Date: Wed, 15 Mar 2023 10:52:40 +0100 Subject: [PATCH 04/10] bump craft minVersion to 1.2.1 (#55) --- .craft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.craft.yml b/.craft.yml index edac7bdb..e1f9bd57 100644 --- a/.craft.yml +++ b/.craft.yml @@ -1,4 +1,4 @@ -minVersion: 1.2.0 +minVersion: 1.2.1 changelogPolicy: auto targets: - name: maven From b02a5f0db934d5f14dbe15c2391de410063816cb Mon Sep 17 00:00:00 2001 From: Giancarlo Buenaflor Date: Wed, 15 Mar 2023 14:31:46 +0100 Subject: [PATCH 05/10] change to cocoapods as source --- buildSrc/src/main/java/Config.kt | 2 +- sentry-kotlin-multiplatform/build.gradle.kts | 6 +----- .../sentry_kotlin_multiplatform.podspec | 4 ++-- sentry-samples/kmp-app/iosApp/Podfile.lock | 20 +++++++++---------- .../kmp-app/shared/build.gradle.kts | 6 +----- sentry-samples/kmp-app/shared/shared.podspec | 2 +- 6 files changed, 16 insertions(+), 24 deletions(-) diff --git a/buildSrc/src/main/java/Config.kt b/buildSrc/src/main/java/Config.kt index fdff7da3..60d11907 100644 --- a/buildSrc/src/main/java/Config.kt +++ b/buildSrc/src/main/java/Config.kt @@ -27,7 +27,7 @@ object Config { val sentryAndroid = "io.sentry:sentry-android:$sentryJavaVersion" val sentryJava = "io.sentry:sentry:$sentryJavaVersion" - val sentryCocoaVersion = "8.2.0" + val sentryCocoaVersion = "8.3.0" val sentryCocoa = "Sentry" } diff --git a/sentry-kotlin-multiplatform/build.gradle.kts b/sentry-kotlin-multiplatform/build.gradle.kts index 5cd76fbf..093a562f 100644 --- a/sentry-kotlin-multiplatform/build.gradle.kts +++ b/sentry-kotlin-multiplatform/build.gradle.kts @@ -82,11 +82,7 @@ kotlin { summary = "Official Sentry SDK Kotlin Multiplatform" homepage = "https://github.com/getsentry/sentry-kotlin-multiplatform" - pod(Config.Libs.sentryCocoa) { - source = git("https://github.com/getsentry/sentry-cocoa.git") { - tag = Config.Libs.sentryCocoaVersion - } - } + pod(Config.Libs.sentryCocoa, "~> ${Config.Libs.sentryCocoaVersion}") ios.deploymentTarget = Config.Cocoa.iosDeploymentTarget osx.deploymentTarget = Config.Cocoa.osxDeploymentTarget diff --git a/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec b/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec index 8691b4a0..820542e1 100644 --- a/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec +++ b/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'sentry_kotlin_multiplatform' - spec.version = '0.0.1' + spec.version = '0.0.1-alpha.2' spec.homepage = 'https://github.com/getsentry/sentry-kotlin-multiplatform' spec.source = { :http=> ''} spec.authors = '' @@ -12,7 +12,7 @@ Pod::Spec.new do |spec| spec.osx.deployment_target = '10.13' spec.tvos.deployment_target = '11.0' spec.watchos.deployment_target = '4.0' - spec.dependency 'Sentry' + spec.dependency 'Sentry', '~> 8.3.0' spec.pod_target_xcconfig = { 'KOTLIN_PROJECT_PATH' => ':sentry-kotlin-multiplatform', diff --git a/sentry-samples/kmp-app/iosApp/Podfile.lock b/sentry-samples/kmp-app/iosApp/Podfile.lock index 1829cdfb..275b85cc 100644 --- a/sentry-samples/kmp-app/iosApp/Podfile.lock +++ b/sentry-samples/kmp-app/iosApp/Podfile.lock @@ -1,12 +1,12 @@ PODS: - - Sentry (8.2.0): - - Sentry/Core (= 8.2.0) - - SentryPrivate (= 8.2.0) - - Sentry/Core (8.2.0): - - SentryPrivate (= 8.2.0) - - SentryPrivate (8.2.0) + - Sentry (8.3.0): + - Sentry/Core (= 8.3.0) + - SentryPrivate (= 8.3.0) + - Sentry/Core (8.3.0): + - SentryPrivate (= 8.3.0) + - SentryPrivate (8.3.0) - shared (1.0): - - Sentry + - Sentry (~> 8.3.0) DEPENDENCIES: - shared (from `../shared`) @@ -21,9 +21,9 @@ EXTERNAL SOURCES: :path: "../shared" SPEC CHECKSUMS: - Sentry: cf1d35c866266da58964fe7b62526bda93ffcb38 - SentryPrivate: 2909bcc7b19a827b49e9bde0e56116b08d40dfdf - shared: 9a8f7e3bffcb968422c4dab15cd0380c58dda99f + Sentry: 757565eb01e2a6ef6b26e897e4e47e8213e12f06 + SentryPrivate: 668d6ce46835769b32e61dc8b5c78ef0b6cdcef8 + shared: 49bda994dff3c1b7e7761338877dd48f2f0447a7 PODFILE CHECKSUM: f282da88f39e69507b0a255187c8a6b644477756 diff --git a/sentry-samples/kmp-app/shared/build.gradle.kts b/sentry-samples/kmp-app/shared/build.gradle.kts index 760436a2..32f9922a 100644 --- a/sentry-samples/kmp-app/shared/build.gradle.kts +++ b/sentry-samples/kmp-app/shared/build.gradle.kts @@ -19,11 +19,7 @@ kotlin { ios.deploymentTarget = "14.1" podfile = project.file("../iosApp/Podfile") - pod(Config.Libs.sentryCocoa) { - source = git("https://github.com/getsentry/sentry-cocoa.git") { - tag = Config.Libs.sentryCocoaVersion - } - } + pod(Config.Libs.sentryCocoa, "~> ${Config.Libs.sentryCocoaVersion}") framework { baseName = "shared" diff --git a/sentry-samples/kmp-app/shared/shared.podspec b/sentry-samples/kmp-app/shared/shared.podspec index 279064f1..247a6d6e 100644 --- a/sentry-samples/kmp-app/shared/shared.podspec +++ b/sentry-samples/kmp-app/shared/shared.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |spec| spec.vendored_frameworks = 'build/cocoapods/framework/shared.framework' spec.libraries = 'c++' spec.ios.deployment_target = '14.1' - spec.dependency 'Sentry' + spec.dependency 'Sentry', '~> 8.3.0' spec.pod_target_xcconfig = { 'KOTLIN_PROJECT_PATH' => ':sentry-samples:kmp-app:shared', From 266a647f973e67ece151ec37e0e7baa014e4f2bc Mon Sep 17 00:00:00 2001 From: Giancarlo Buenaflor Date: Thu, 16 Mar 2023 11:55:24 +0100 Subject: [PATCH 06/10] 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 Co-authored-by: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> --- .github/workflows/format.yml | 1 - README.md | 29 +++++++++++++---------------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 14c70e51..da2c3684 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -25,7 +25,6 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-gradle- - - name: Make format run: make format diff --git a/README.md b/README.md index dbea34fb..dfc854f4 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,10 @@ This project is an experimental SDK for Kotlin Multiplatform. This SDK is a wrapper around different platforms such as JVM, Android, iOS, macOS, watchOS, tvOS that can be used on Kotlin Multiplatform. +| Packages | Maven Central +|-----------------------------------------| ------- +| sentry-kotlin-multiplatform | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-kotlin-multiplatform/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-kotlin-multiplatform) + ## Supported Platforms | Target Platform | Target preset | @@ -24,36 +28,29 @@ This SDK is a wrapper around different platforms such as JVM, Android, iOS, macO ## Configure Repository -The Kotlin Multiplatform SDK is available only on `mavenLocal`. You can declare this repository in your build script as follows: +The Kotlin Multiplatform SDK is available on `mavenCentral`. You can declare this repository in your build script as follows: ```gradle repositories { - // Currently only supported locally - mavenLocal() + mavenCentral() } ``` -and then run: - -```bash -./gradlew publishToMavenLocal -``` - ## Add dependency For a multiplatform project, you need to add the sentry-kotlin-multiplatform artifact to the `commonMain` source set: ```Kotlin val commonMain by getting { dependencies { - api("io.sentry:sentry-kotlin-multiplatform:0.0.1") + api("io.sentry:sentry-kotlin-multiplatform:") } } ``` ### Cocoa -If you are targeting Apple platforms (iOS, macOS, watchOS, tvOS), then you need to use CocoaPods to include [Sentry Cocoa](https://github.com/getsentry/sentry-cocoa) into this SDK. -One way to achieve this is to include the Sentry Cocoa SDK via the Kotlin CocoaPods extension. Be aware that your Sentry Cocoa version has to match the SDK's version. Currently the supported version is `~> 7.21.0` +If you are targeting Apple platforms (iOS, macOS, watchOS, tvOS), then you can use CocoaPods to include [Sentry Cocoa](https://github.com/getsentry/sentry-cocoa) into this SDK. +One way to achieve this is to include the Sentry Cocoa SDK via the Kotlin CocoaPods extension. Be aware that your Sentry Cocoa version has to match the version used in the KMP SDK. ```gradle cocoapods { @@ -66,7 +63,7 @@ cocoapods { baseName = "shared" // Export the SDK in order to be able to access it directly in the iOS project - export("io.sentry:sentry-kotlin-multiplatform:0.0.1") + export("io.sentry:sentry-kotlin-multiplatform:") } } ``` @@ -75,11 +72,11 @@ cocoapods { There are two main strategies for initializing the SDK: - Shared initializer - - Platform specific initializers + - Platform-specific initializers Shared initializer will initialize the SDK in your shared codebase but you will use the same configuration options for all platforms. -Platform specific initializers initialize the SDK directly in the target platform. The benefit is being able to customize the configuration options specific to the platforms. +Platform-specific initializers initialize the SDK directly in the target platform. The benefit is being able to customize the configuration options specific to the platforms. It is also possible to mix those two strategies based on your needs and project setup. @@ -140,7 +137,7 @@ class AppDelegate: NSObject, UIApplicationDelegate { } ``` -## Platform Specific Initializers +## Platform-Specific Initializers ### Android ```Kotlin From c0e58b199c1e2c3bc98e70c0e1ff2cfcfd6f78e0 Mon Sep 17 00:00:00 2001 From: Giancarlo Buenaflor Date: Thu, 16 Mar 2023 13:03:11 +0100 Subject: [PATCH 07/10] update sentry cocoa version in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dfc854f4..851604fe 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ cocoapods { // ... // Make sure Sentry Cocoa in your project matches this version - pod("Sentry", "~> 8.2.0") + pod("Sentry", "~> 8.3.0") framework { baseName = "shared" From 081925de0c5f33e4ec867335866ffd20d5077bbf Mon Sep 17 00:00:00 2001 From: buenaflor Date: Mon, 17 Apr 2023 12:28:19 +0200 Subject: [PATCH 08/10] update pospec and changelog --- CHANGELOG.md | 3 ++- .../sentry_kotlin_multiplatform.podspec | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eeb47509..4da6dc17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,11 @@ # Changelog -## 0.0.1-alpha.2 +## Unreleased ### Features - Improve Objc/Swift experience with @HiddenFromObjc ([#62](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/62)) +- feat: add view hierarchy ([#53](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/53)) ### Fixes diff --git a/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec b/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec index 820542e1..f2e54896 100644 --- a/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec +++ b/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'sentry_kotlin_multiplatform' - spec.version = '0.0.1-alpha.2' + spec.version = '0.0.1' spec.homepage = 'https://github.com/getsentry/sentry-kotlin-multiplatform' spec.source = { :http=> ''} spec.authors = '' From 1d16e8ae4ba5ca89e40caf9f1af0221a62c16931 Mon Sep 17 00:00:00 2001 From: buenaflor Date: Mon, 17 Apr 2023 12:51:38 +0200 Subject: [PATCH 09/10] bump cocoa version to 8.4.0 and use attachViewHierarchy on Android --- README.md | 2 +- buildSrc/src/main/java/Config.kt | 2 +- .../sentry_kotlin_multiplatform.podspec | 2 +- .../SentryAndroidOptionsExtensions.kt | 1 + sentry-samples/kmp-app/iosApp/Podfile.lock | 20 +++++++++---------- sentry-samples/kmp-app/shared/shared.podspec | 2 +- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index b9461d6a..54873013 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ cocoapods { // ... // Make sure Sentry Cocoa in your project matches this version - pod("Sentry", "~> 8.3.0") + pod("Sentry", "~> 8.4.0") framework { baseName = "shared" diff --git a/buildSrc/src/main/java/Config.kt b/buildSrc/src/main/java/Config.kt index 0f6bb6a1..663f454b 100644 --- a/buildSrc/src/main/java/Config.kt +++ b/buildSrc/src/main/java/Config.kt @@ -27,7 +27,7 @@ object Config { val sentryAndroid = "io.sentry:sentry-android:$sentryJavaVersion" val sentryJava = "io.sentry:sentry:$sentryJavaVersion" - val sentryCocoaVersion = "8.3.0" + val sentryCocoaVersion = "8.4.0" val sentryCocoa = "Sentry" } diff --git a/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec b/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec index f2e54896..54a741e6 100644 --- a/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec +++ b/sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec @@ -12,7 +12,7 @@ Pod::Spec.new do |spec| spec.osx.deployment_target = '10.13' spec.tvos.deployment_target = '11.0' spec.watchos.deployment_target = '4.0' - spec.dependency 'Sentry', '~> 8.3.0' + spec.dependency 'Sentry', '~> 8.4.0' spec.pod_target_xcconfig = { 'KOTLIN_PROJECT_PATH' => ':sentry-kotlin-multiplatform', diff --git a/sentry-kotlin-multiplatform/src/androidMain/kotlin/io/sentry/kotlin/multiplatform/extensions/SentryAndroidOptionsExtensions.kt b/sentry-kotlin-multiplatform/src/androidMain/kotlin/io/sentry/kotlin/multiplatform/extensions/SentryAndroidOptionsExtensions.kt index b07be889..cca0dd82 100644 --- a/sentry-kotlin-multiplatform/src/androidMain/kotlin/io/sentry/kotlin/multiplatform/extensions/SentryAndroidOptionsExtensions.kt +++ b/sentry-kotlin-multiplatform/src/androidMain/kotlin/io/sentry/kotlin/multiplatform/extensions/SentryAndroidOptionsExtensions.kt @@ -10,6 +10,7 @@ internal fun SentryOptions.toAndroidSentryOptionsCallback(): (SentryAndroidOptio // Apply Android specific options it.isAttachScreenshot = this.attachScreenshot + it.isAttachViewHierarchy = this.attachViewHierarchy it.sdkVersion?.name = this.sdk?.name ?: BuildKonfig.SENTRY_KMP_ANDROID_SDK_NAME it.sdkVersion?.version = this.sdk?.version ?: BuildKonfig.VERSION_NAME diff --git a/sentry-samples/kmp-app/iosApp/Podfile.lock b/sentry-samples/kmp-app/iosApp/Podfile.lock index 275b85cc..bfe0d33e 100644 --- a/sentry-samples/kmp-app/iosApp/Podfile.lock +++ b/sentry-samples/kmp-app/iosApp/Podfile.lock @@ -1,12 +1,12 @@ PODS: - - Sentry (8.3.0): - - Sentry/Core (= 8.3.0) - - SentryPrivate (= 8.3.0) - - Sentry/Core (8.3.0): - - SentryPrivate (= 8.3.0) - - SentryPrivate (8.3.0) + - Sentry (8.4.0): + - Sentry/Core (= 8.4.0) + - SentryPrivate (= 8.4.0) + - Sentry/Core (8.4.0): + - SentryPrivate (= 8.4.0) + - SentryPrivate (8.4.0) - shared (1.0): - - Sentry (~> 8.3.0) + - Sentry (~> 8.4.0) DEPENDENCIES: - shared (from `../shared`) @@ -21,9 +21,9 @@ EXTERNAL SOURCES: :path: "../shared" SPEC CHECKSUMS: - Sentry: 757565eb01e2a6ef6b26e897e4e47e8213e12f06 - SentryPrivate: 668d6ce46835769b32e61dc8b5c78ef0b6cdcef8 - shared: 49bda994dff3c1b7e7761338877dd48f2f0447a7 + Sentry: 16d46dd5ca10e7f4469a2611805a3de123188add + SentryPrivate: 2bb4f8d9ff558b25ac70b66c1dedc58a7c43630b + shared: 0dca2e824df822c0e0186869c320e4ba675f23ed PODFILE CHECKSUM: f282da88f39e69507b0a255187c8a6b644477756 diff --git a/sentry-samples/kmp-app/shared/shared.podspec b/sentry-samples/kmp-app/shared/shared.podspec index 247a6d6e..14bc67a4 100644 --- a/sentry-samples/kmp-app/shared/shared.podspec +++ b/sentry-samples/kmp-app/shared/shared.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |spec| spec.vendored_frameworks = 'build/cocoapods/framework/shared.framework' spec.libraries = 'c++' spec.ios.deployment_target = '14.1' - spec.dependency 'Sentry', '~> 8.3.0' + spec.dependency 'Sentry', '~> 8.4.0' spec.pod_target_xcconfig = { 'KOTLIN_PROJECT_PATH' => ':sentry-samples:kmp-app:shared', From cf1a1ec47cedf714e1ed45f07360c9999729b168 Mon Sep 17 00:00:00 2001 From: buenaflor Date: Mon, 17 Apr 2023 13:04:10 +0200 Subject: [PATCH 10/10] add iOS and Android availability comment --- .../kotlin/io/sentry/kotlin/multiplatform/SentryOptions.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sentry-kotlin-multiplatform/src/commonMain/kotlin/io/sentry/kotlin/multiplatform/SentryOptions.kt b/sentry-kotlin-multiplatform/src/commonMain/kotlin/io/sentry/kotlin/multiplatform/SentryOptions.kt index ef462ccb..0a8faa83 100644 --- a/sentry-kotlin-multiplatform/src/commonMain/kotlin/io/sentry/kotlin/multiplatform/SentryOptions.kt +++ b/sentry-kotlin-multiplatform/src/commonMain/kotlin/io/sentry/kotlin/multiplatform/SentryOptions.kt @@ -67,6 +67,9 @@ public open class SentryOptions { /** This variable controls the max attachment size in bytes */ public var maxAttachmentSize: Long = 20 * 1024 * 1024 - /** Enables or disables the attach view hierarchy feature when an error happened. */ + /** + * Enables or disables the attach view hierarchy feature when an error happened. + * This is only available on iOS and Android. + */ public var attachViewHierarchy: Boolean = false }