Hi folks, please let me know if this is not the co...
# multiplatform
i
Hi folks, please let me know if this is not the correct channel, I've a KMP application targeting Android and iOS. On iOS, I'm upgrading Kotlin from 1.9.20 to 2.0.20. I've run into a small issue, where some of the Objective-C method names have underscore at the end. The names are
name
,
value
,
type
,
set
and
start
. I couldn't find any documentation on this behaviour change in upgrade notes. Is there a list somewhere? From searching, I've seen some discussion on Github and SO but no clear explanation or behavior. 1. Is there a list of keywords that get mangled? 2. Is this because of conflicts? I've checked the generated header file and apart from
type
, there shouldn't be a conflict with any other names with any other interfaces.
r
Underscores happen when there are naming conflicts. For example if you have two Kotlin things called
name
that can't have the same name in Objective-C, then one of them will become
name_
. That behavior has always existed, so I'm not sure what changed between 1.9.20 and 2.0.20 to cause you to see it happen in places it wasn't happening before.
g
are you using any 3rd party library? In my case I ran into a bunch of errors due to lack of support by Realm. Maybe check your if your libraries support kotlin 2.0+
i
No, I'm not using 3rd party libraries.
> Underscores happen when there are naming conflicts. I guess I'll have to live with it. There's no conflicting method names that I found but it's an internal API, so I can refactor Objective-C side. 🙁