*TL;DR*: Is it possible to disable the generation ...
# multiplatform
v
TL;DR: Is it possible to disable the generation of
componentX()
methods on
data class
? Hi, we have a kmm project for android and iOS targets. Currently, i’ve been working on reducing the library size and especially the library objc header for iOS. I noticed that `data class`es generate component methods for each value in the constructor. This is what I would expect. Those
componentX()
methods also appear in the header, but usually there is no need for the iOS developers to call the method. This is because they can call the parameter by name, which is far more descriptive.
🚫 1
3
j
v
Thanks Jake, I guess that you can’t disable the component method generation, because of destructuring syntax and other kotlin features, that depend on it, right?
s
Will be fixed in 1.8.0
k
May I know how? Is there any issue about it?
s
These methods just won’t get into objc header. https://youtrack.jetbrains.com/issue/KT-42641
k
That's great, thanks!
v
Awesome Sergey, really nice to know. metal
Just for reference, this can save us about 1.000 lines in the objective-C header (out of total 12.500 lines). Definitely a win for the iOS team.
s
IDK. How is it relevant here?