Is there some trick to using NonEmptyList on iOS? ...
# arrow
j
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
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.
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
Sorry, I don't do iOS 😕 Do ask if you have the same problem in JS or TS though 🙂
I do use Arrow & Compose on iOS, but it's pure Kotlin code, I don't do interop with Swift 😕
j
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