Skip to content

Commit cdc74b0

Browse files
github-actions[bot]web-flowbuenaflor
authored
chore(deps): update Cocoa SDK to v8.57.1 (#474)
* chore: update scripts/update-cocoa.sh to 8.57.1 * Update used API * Clean up * Update Sentry version in SPM sample * Update Sentry version in SPM sample * Update --------- Co-authored-by: GitHub <noreply@github.com> Co-authored-by: Giancarlo Buenaflor <giancarlobuenaflor97@gmail.com>
1 parent 9f9c527 commit cdc74b0

File tree

13 files changed

+34
-69
lines changed

13 files changed

+34
-69
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Dependencies
6+
7+
- Bump Cocoa SDK from v8.55.1 to v8.57.1 ([#474](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/474))
8+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8571)
9+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.55.1...8.57.1)
10+
311
## 0.20.0
412

513
### Dependencies

buildSrc/src/main/java/Config.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ object Config {
3737
val sentryAndroid = "io.sentry:sentry-android:$sentryJavaVersion"
3838
val sentryJava = "io.sentry:sentry:$sentryJavaVersion"
3939

40-
val sentryCocoaVersion = "8.55.1"
40+
val sentryCocoaVersion = "8.57.1"
4141
val sentryCocoa = "Sentry"
4242

4343
object Samples {

sentry-kotlin-multiplatform-gradle-plugin/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ id=io.sentry.kotlin.multiplatform.gradle
22
implementationClass=io.sentry.kotlin.multiplatform.gradle.SentryPlugin
33
versionName=0.20.0
44
group=io.sentry
5-
sentryCocoaVersion=8.55.1
5+
sentryCocoaVersion=8.57.1
66

77
# publication pom properties
88
POM_NAME=Sentry Kotlin Multiplatform Gradle Plugin

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.55.1'
15+
spec.dependency 'Sentry', '8.57.1'
1616

1717
if !Dir.exist?('build/cocoapods/framework/sentry_kotlin_multiplatform.framework') || Dir.empty?('build/cocoapods/framework/sentry_kotlin_multiplatform.framework')
1818
raise "

sentry-kotlin-multiplatform/src/appleMain/kotlin/io/sentry/kotlin/multiplatform/nsexception/SentryUnhandledExceptions.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ import platform.Foundation.NSNumber
2121

2222
private typealias InternalSentryEvent = Internal.Sentry.SentryEvent
2323
private typealias InternalSentrySDK = Internal.Sentry.SentrySDKInternal
24-
private typealias InternalSentryEnvelope = Internal.Sentry.SentryEnvelope
2524
private typealias InternalSentryDependencyContainer = Internal.Sentry.SentryDependencyContainer
26-
private typealias InternalSentryEnvelopeHeader = Internal.Sentry.SentryEnvelopeHeader
27-
private typealias InternalSentryEnvelopeItem = Internal.Sentry.SentryEnvelopeItem
2825
private typealias InternalSentryThreadInspector = Internal.Sentry.SentryThreadInspector
2926

3027
private typealias CocoapodsSentryEvent = cocoapods.Sentry.SentryEvent
@@ -33,6 +30,9 @@ private typealias CocoapodsSentryStacktrace = cocoapods.Sentry.SentryStacktrace
3330
private typealias CocoapodsSentryException = cocoapods.Sentry.SentryException
3431
private typealias CocoapodsSentryMechanism = cocoapods.Sentry.SentryMechanism
3532
private typealias CocoapodsSentryThread = cocoapods.Sentry.SentryThread
33+
private typealias CocoapodsSentryEnvelope = cocoapods.Sentry.SentryEnvelope
34+
private typealias CocoapodsSentryEnvelopeHeader = cocoapods.Sentry.SentryEnvelopeHeader
35+
private typealias CocoapodsSentryEnvelopeItem = cocoapods.Sentry.SentryEnvelopeItem
3636

3737
/**
3838
* Drops the Kotlin crash that follows an unhandled Kotlin exception except our custom SentryEvent.
@@ -57,7 +57,7 @@ public fun setSentryUnhandledExceptionHook(): Unit = wrapUnhandledExceptionHook
5757
val envelope = throwable.asSentryEnvelope()
5858
// The envelope will be persisted, so we can safely terminate afterwards.
5959
// https://github.com/getsentry/sentry-cocoa/blob/678172142ac1d10f5ed7978f69d16ab03e801057/Sources/Sentry/SentryClient.m#L409
60-
InternalSentrySDK.storeEnvelope(envelope)
60+
InternalSentrySDK.storeEnvelope(envelope as objcnames.classes.SentryEnvelope)
6161
CocoapodsSentrySDK.configureScope { scope ->
6262
scope?.setTagValue(KOTLIN_CRASH_TAG, KOTLIN_CRASH_TAG)
6363
}
@@ -71,20 +71,20 @@ internal const val KOTLIN_CRASH_TAG = "nsexceptionkt.kotlin_crashed"
7171
/**
7272
* Converts `this` [Throwable] to a [SentryEnvelope].
7373
*/
74-
internal fun Throwable.asSentryEnvelope(): InternalSentryEnvelope {
74+
private fun Throwable.asSentryEnvelope(): CocoapodsSentryEnvelope {
7575
val event = asSentryEvent() as InternalSentryEvent
7676
val preparedEvent = InternalSentrySDK.currentHub().let { hub ->
7777
hub.getClient()
7878
?.prepareEvent(event, hub.scope, alwaysAttachStacktrace = false, isFatalEvent = true)
7979
} ?: event
80-
val item = InternalSentryEnvelopeItem(preparedEvent)
80+
val item = CocoapodsSentryEnvelopeItem(event = preparedEvent as cocoapods.Sentry.SentryEvent)
8181
// TODO: pass traceState when enabling performance monitoring for KMP SDK
82-
val header = InternalSentryEnvelopeHeader(preparedEvent.eventId, null)
83-
return InternalSentryEnvelope(header, listOf(item))
82+
val header = CocoapodsSentryEnvelopeHeader(id = preparedEvent.eventId)
83+
return CocoapodsSentryEnvelope(header, listOf(item))
8484
}
8585

8686
/**
87-
* Converts `this` [Throwable] to a [SentryEvent].
87+
* Converts `this` [Throwable] to a [cocoapods.Sentry.SentryEvent].
8888
*/
8989
@Suppress("UnnecessaryOptInAnnotation")
9090
private fun Throwable.asSentryEvent(): CocoapodsSentryEvent =
@@ -110,7 +110,7 @@ private fun Throwable.asSentryEvent(): CocoapodsSentryEvent =
110110
}
111111

112112
/**
113-
* Converts `this` [NSException] to a [SentryException].
113+
* Converts `this` [NSException] to a [io.sentry.kotlin.multiplatform.protocol.SentryException].
114114
*/
115115
private fun NSException.asSentryException(
116116
threadId: NSNumber?
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language = Objective-C
2-
headers = SentryClient.h SentryDebugImageProvider.h SentryEnvelope.h \ SentryHub.h SentryScope.h \
2+
headers = SentryClient.h SentryEvent.h SentryDebugImageProvider.h SentryHub.h SentryScope.h \
33
SentryCrashMonitor_NSException.h SentryCrashMonitor_NSException+NSExceptionKt.h \
44
SentryCrashStackCursor.h SentryDependencyContainer.h SentryHook.h SentrySDKInternal.h \
55
SentryStacktraceBuilder.h SentryThreadInspector.h PrivateSentrySDKOnly.h \

sentry-kotlin-multiplatform/src/nativeInterop/cinterop/SentryInternal/SentryEnvelope.h

Lines changed: 0 additions & 42 deletions
This file was deleted.

sentry-kotlin-multiplatform/src/nativeInterop/cinterop/SentryInternal/SentryEvent.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,4 @@
2424

2525
@property (nonatomic, assign) BOOL isFatalEvent;
2626

27-
@property (nonatomic, strong) SentryId *eventId;
28-
2927
@end

sentry-kotlin-multiplatform/src/nativeInterop/cinterop/SentryInternal/SentrySDKInternal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
// The above copyright notice and this permission notice shall be included in all
1717
// copies or substantial portions of the Software.
1818

19-
#import <SentryEnvelope.h>
19+
@class SentryEnvelope;
20+
2021
#import <SentryHub.h>
2122

2223
@interface SentrySDKInternal : NSObject

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
PODS:
2-
- Sentry (8.55.1):
3-
- Sentry/Core (= 8.55.1)
4-
- Sentry/Core (8.55.1)
2+
- Sentry (8.57.1):
3+
- Sentry/Core (= 8.57.1)
4+
- Sentry/Core (8.57.1)
55
- shared (1.0):
6-
- Sentry (= 8.55.1)
6+
- Sentry (= 8.57.1)
77

88
DEPENDENCIES:
99
- shared (from `../shared`)
@@ -17,8 +17,8 @@ EXTERNAL SOURCES:
1717
:path: "../shared"
1818

1919
SPEC CHECKSUMS:
20-
Sentry: 6c92b12db0634612f6a66757890fea97e788fe12
21-
shared: 889fbc0d727dc0533f7fc04bee9d2d0418190291
20+
Sentry: ea4ca7cd1a46c77dcc8123804ce36d8f5603a841
21+
shared: 84e27d3ad161d8351fdb4f11eecf42fec2623cf8
2222

2323
PODFILE CHECKSUM: f282da88f39e69507b0a255187c8a6b644477756
2424

0 commit comments

Comments
 (0)