-
-
Notifications
You must be signed in to change notification settings - Fork 19
feat: improve Objc/Swift experience with HiddenFromObjc #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,8 @@ import io.sentry.kotlin.multiplatform.protocol.Breadcrumb | |
| import io.sentry.kotlin.multiplatform.protocol.SentryId | ||
| import io.sentry.kotlin.multiplatform.protocol.User | ||
| import io.sentry.kotlin.multiplatform.protocol.UserFeedback | ||
| import kotlin.experimental.ExperimentalObjCRefinement | ||
| import kotlin.native.HiddenFromObjC | ||
|
|
||
| typealias ScopeCallback = (Scope) -> Unit | ||
| typealias OptionsConfiguration = (SentryOptions) -> Unit | ||
|
|
@@ -19,6 +21,8 @@ object Sentry { | |
| * @param context: The context (used for retrieving Android Context) | ||
| * @param configuration Options configuration handler. | ||
| */ | ||
| @OptIn(ExperimentalObjCRefinement::class) | ||
| @HiddenFromObjC | ||
|
Comment on lines
+24
to
+25
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. M: Does this require a min. version of KMP that would not work in older versions?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The min. version for using our KMP sdk is |
||
| fun init(context: Context, configuration: OptionsConfiguration) { | ||
| SentryBridge.init(context, configuration) | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,15 +3,15 @@ import shared | |
|
|
||
| @main | ||
| struct iOSApp: App { | ||
| let sentry = Sentry() | ||
|
|
||
| let sentry = Sentry.shared | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Singletons mapped via Kotlin should be accessed via |
||
| init() { | ||
| // Initialize Sentry using shared code | ||
| AppSetupKt.initializeSentry() | ||
|
|
||
| // Shared scope across all platforms | ||
| AppSetupKt.configureSentryScope() | ||
|
|
||
| // Add platform specific scope in addition to the shared scope | ||
| sentry.configureScope { scope in | ||
| scope.setContext(key: "iOS Context", value: [ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.