You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.
I'm just testing out using Kotlin Native to create a cross-platform library, and so far it looks fantastic! One wrinkle, though: when I make an Objective C framework (for use on iOS) it exports MyClass just fine, but also outputs MyClassCompanionObject, with static functions attached.
I understand why that's happening, and in many ways it's the more correct interpretation of the Kotlin code, but it doesn't match any pattern used in Objective C or Swift. Is there any way to combine these two classes to provide static functions on the original class?
The text was updated successfully, but these errors were encountered:
I would suggest an opt-in mechanism, probably something like @JvmStatic but for Objective-C. object (free or companion) members annotated with e.g. @ObjCStatic would cause the compiler to emit a static bridge (on the enclosing class in the case of companion objects, otherwise on the actual object type).
I'm just testing out using Kotlin Native to create a cross-platform library, and so far it looks fantastic! One wrinkle, though: when I make an Objective C framework (for use on iOS) it exports
MyClass
just fine, but also outputsMyClassCompanionObject
, with static functions attached.I understand why that's happening, and in many ways it's the more correct interpretation of the Kotlin code, but it doesn't match any pattern used in Objective C or Swift. Is there any way to combine these two classes to provide static functions on the original class?
The text was updated successfully, but these errors were encountered: