andylamax
01/16/2023, 8:47 AMList
(written in kotlin) is mapped to an `Array`/`NSArray` in Swift/OC
I know that a MutableList
is mapped to an NSMutableArray
but it is unclear what an Array
(written in kotlin) is mapped to in Swift.
is it also mapped into a
1. Array
/`NSArray`
2. NSMutableArray
3. KotlinArray
How is a kotlin Array mapped into a C as well?. Also not clear in the documentationKevin S
01/18/2023, 2:44 PMArray
isnt in there. I think for the most part I just stick to lists when doing KMM workLandry Norris
01/18/2023, 7:01 PMLandry Norris
01/18/2023, 7:04 PMCPointer<Something>.toArray(size: Int)
, but different libraries have different ways of determining size, so this has to be written manually, and is also unsafe, as it relies on the assumption that the size is correct. An incorrect size value can lead to very difficult to debug problems.Landry Norris
01/18/2023, 7:06 PMandylamax
01/18/2023, 9:27 PMI just stick to List...
Its all fine sticking with Lists until you start targeting Javascript as well. That's where it all fails hard