Anonymike
03/16/2023, 4:36 PMKevin S
03/16/2023, 5:01 PMid
is a special name. In objective-C id
is a pointer type, so maybe that is the issue. Can you try renaming it slightly and seeing if it works? Maybe try _id
or identifier
. If you are getting this from somewhere you can also use @SerializedName to cover the name changeAnonymike
03/16/2023, 5:22 PMval itemId get() = id
but that fails as well. I'm trying to republish the API with the property changed to test this more thoroughly, but whats really odd is we have other properties called id as well in the exact same style and we even see id in many examples.Anonymike
03/17/2023, 6:01 PMid
changed from id to itemId
. It worked and the only difference with that class turns out to be that it implements an interface that defines the id
property. My guess right now is that you are correct and the Objective-C id
issue is causing the problem, but only when id
is part of an interface, not when it is part of a class. This project has multiple other data classes, all with id
properties that work fine.
Thank you for your input @Kevin S. If I can, I'll try to create a reproducer for the Kotlin team if it is something they can handle. I'm assuming they did something to handle this with non-interface classes, but I don't know Objective-C well enough to say offhand. I do know we also ran into a similar issue with a property named description
on our first project haha.