Hi All, just a quick query about cinterops. I’ve w...
# multiplatform
p
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>
	{
		//blah
	}
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.
z
I'm less sure about cinterops, but according to this: https://kotlinlang.org/docs/native-objc-interop.html#mappings Array will map to List. I think you may have to settle for your map approach: