Did I miss something or now the global variables a...
# kotlin-native
l
Did I miss something or now the global variables are not exported anymore to the iOS Framework? (I’m not saying global variables should be used)
s
Global variables declared in the module you compile to framework must still be exported. They have been moved to different classes some time ago: declarations from
file.kt
could be found in
${prefix}FileKt
.
o
for example for
Copy code
val x = "Hello"
we get framework with declaration
Copy code
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("XxKt")))
@interface XxXxKt : KotlinBase
@property (class, readonly) NSString *x;
@end;
l
Thanks a lot for the explanation!