Hello,
On shared code "commonMain" (Kotlin), I have this class:
Copy code
@Serializable
data class GeoPoint(
var latitude: Double = 0.0,
var longitude: Double = 0.0
)
I am trying to instantiate a simple object in my iOS (Swift) code:
Copy code
@State var myGeopoint = GeoPoint()
However this returns the error:
'init()' is unavailable
For a list of GeoPoints the error does not appear.
Why this is different?
Any easier workaround? This should be related to Kotlin more than with Swift I believe.
I just want a simple contructor with the properties empty/null.