Hello everyone! In my current company we are inter...
# ios
m
Hello everyone! In my current company we are interested in how the KMM generated Objective-C types are typically used inside the iOS project. Are you using the Objective-C types directly or do you have a layer mapping each Objective-C type to a Swift type? The latter approach looks unneeded overhead and defeating part of the advantages of KMM at first sight but we'd like to understand if there are some benefits using this approach. Thanks!
r
IMO there are cases where a Swift wrapper is beneficial. Things like suspend/async functions, enums and interface/protocol extensions for example. However generally speaking I wouldn't just wrap everything in a Swift type. Once you encounter a limitation in the Kotlin - ObjC - Swift interop you just need to asks yourself if it's that big of an issue. Depending on how big of an issue it is you might be able to live with it, tweak it on the Kotlin side, or as a last resort use some Swift magic.