# multiplatform

Pete Hellyer

10/04/2023, 1:55 PM
Hi All, just a quick query about cinterops. I’ve written a fun in swift, like so:
Copy code
@objc public func getStuff() -> Array<nativeStuff>
when the interop is compiled, on the kotlin side, this returns as List<*>, is this the correct behaviour? if so, what is the right thing to do on the kotlin side? cast back to nativeStuff? e.g. getstuff().map{it as nativeStuff} ? or is there something secret that I havent worked out to get arrays of objects to return as arrays of objects.


10/04/2023, 10:26 PM
I'm less sure about cinterops, but according to this: Array will map to List. I think you may have to settle for your map approach: