-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: improve Objc/Swift experience with HiddenFromObjc #62
Conversation
@@ -3,15 +3,15 @@ import shared | |||
|
|||
@main | |||
struct iOSApp: App { | |||
let sentry = Sentry() | |||
|
|||
let sentry = Sentry.shared |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Singletons mapped via Kotlin should be accessed via .shared
: https://kotlinlang.org/docs/native-objc-interop.html#kotlin-singletons
@OptIn(ExperimentalObjCRefinement::class) | ||
@HiddenFromObjC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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?
If yes, maybe we can consider just adding a comment that this is not for Apple folks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The min. version for using our KMP sdk is 1.8.0
so nothing would change for current users, I should probably add a badge or something similar to our readme
Add
@HiddenFromObjc
annotation to hideinit
with context from Cocoa targets.This is very useful if we want to have certain things hidden to make the Swift experience better in general
https://kotlinlang.org/docs/native-objc-interop.html