Is there some trick to using NonEmptyList on iOS? I have a class in the Kotlin shared code that has a field of a NonEmptyList. If I try to instantiate the class from the Swift code, the field appears as a usual Swift Array. And using the non empty list in the Kotlin code from an object creating in Swift gives weird errors where printing the nel shows the items in it, but the size is 0 and accessing the items results in out of bounds exception.
s
simon.vergauwen
02/08/2024, 4:25 PM
Hey @Jon Bailey,
That's a great question. I am not sure actually, perhaps @CLOVIS can shed some light. IIRC he uses KMP on iOS with Arrow/Compose.
simon.vergauwen
02/08/2024, 4:27 PM
We'd love to improve this interop, and support but we've had no request for changing the current support, and I personally haven't tried to rely on Arrow code except from Java.
But never from Swift, JS, or Typescript.
c
CLOVIS
02/08/2024, 4:45 PM
Sorry, I don't do iOS 😕 Do ask if you have the same problem in JS or TS though 🙂
CLOVIS
02/08/2024, 4:46 PM
I do use Arrow & Compose on iOS, but it's pure Kotlin code, I don't do interop with Swift 😕
j
Jon Bailey
02/08/2024, 7:05 PM
Fair :) it’s not been a problem for the last 3 years and even now it’s just for some mock data. I think the arrow types are usually internal to the shared code