When I use <https://github.com/touchlab/KMMBridgeK...
# touchlab-tools
a
When I use https://github.com/touchlab/KMMBridgeKickStart, I see that on iOS, the classes appear as
ModuleNameClass
, for example
BreedsBreed
Is there a way to fix it?
r
1.8 added an
@ObjCName
annotation that can help with this, but we haven't adapted most of our samples yet. https://kotlinlang.org/docs/whatsnew18.html#improved-objective-c-swift-interoperability
a
Thats good to know. Can this be applied to Database generated classes - for example
Breed
? I see that https://github.com/cashapp/sqldelight/issues/3738 is blocking sqldelight with kotlin 1.8
k
Not that I’m aware of. Also, I wouldn’t expect that to impact the
ModuleNameClass
naming scheme. Just the
Class
end of it. You can export the data module, which will remove the
ModuleName
prefix, but we specifically don’t do that because it’ll add all of the auto-generated sqldelight code to your public iOS interface. That means extra classes in the header you don’t need, and also extra binary size in your final app. At some point I’d like to add a way to control the module name prefix to Kotlin, but right now the only way to remove the
ModuleName
prefix is to export the module.