Marc Knaup
06/06/2019, 2:51 PMwebsiteUrl
in Kotlin and websiteURL
in ObjC/Swift 🙂Dominaezzz
06/06/2019, 3:31 PMDominaezzz
06/06/2019, 3:31 PM@JvmName
.Marc Knaup
06/06/2019, 3:32 PMMarc Knaup
06/06/2019, 3:32 PMDominaezzz
06/06/2019, 3:33 PMArtyom Degtyarev [JB]
06/06/2019, 3:57 PMMarc Knaup
06/06/2019, 4:20 PM@CName
seems to be for a different purpose though:
Makes top level function available from C/C++ code with the given name.Even though it's documented I cannot actually use it in my code. It doesn't exist 😮
Artyom Degtyarev [JB]
06/06/2019, 4:36 PMkotlin.native.CName
? In example here https://github.com/JetBrains/kotlin-native/tree/master/backend.native/tests/produce_dynamic/simple it looks like this should help.
And yes, I might be misleading with it’s purpose, but I’m not sure what kind of name-changing you want to achieve.Marc Knaup
06/06/2019, 4:38 PMrusshwolf
06/06/2019, 4:50 PM@OptionalExpectation annotation class CName
in your common code and actual typealias CName = kotlin.native.CName
in your native. I haven't tried CName
on iOS though so I don't know if there's something different for ObjC.Marc Knaup
06/06/2019, 5:22 PMCName
is for C
exports 🙂 iOS code is ObjC which is very different and Swift will be even more different.russhwolf
06/06/2019, 5:41 PM@CName
and not a separate @ObjCName
, I figure maybe it's worth a try. Definitely nothing Swift-specific exists right now though because Kotlin only interops with Obj-CMarc Knaup
06/06/2019, 5:42 PMCName
in my project. Neither in common code, nor in platform code 😕svyatoslav.scherbina
06/07/2019, 8:03 AMCName
doesn’t affect produced Objective-C/Swift API.
ObjCName/SwiftName
is not available yet.russhwolf
06/07/2019, 12:05 PM