Has anyone been able to successfully get a KMM lib...
# multiplatform
r
Has anyone been able to successfully get a KMM library running on a arm64 simulator on an M1? I posted by build.gradle earlier, but after working through several related errors, I keep getting errors in Xcode when building. If anyone could post their build.gradle/link to their project setup or give suggestions that would be helpful. https://kotlinlang.slack.com/archives/C3PQML5NU/p1654122829530829
h
Do you want to keep cocoapods? Otherwise using XCFramework is less error prone.
k
Cocoapods should be fine. Xcframework isn't less error prone, certainly not for kmm as there's more "official" cocoapods support. It would be much easier to diagnose with something public to be able to run directly, but if you could post build files that would be useful. I saw the build file in the other thread, and if that hasn't changed, no need to repost I guess. I'm wrapping things up for tonight but can take a look over the weekend if it's still an issue. Weird error, though. Haven't seen that one.
m
Aside from this specific problem, is it currently possible at all to get anything running on the iOS simulator due to this bug https://kotlinlang.slack.com/archives/C0346LWVBJ4/p1655283852255309 Or do you just use the simulator differently?
k
That looks like it's specific to native compose, which is not even experimental. That's just a proof of concept. Just running kmm apps on a simulator it pretty much what I do all day. If that was generally broken I think the whole platform would be over.
We also run compose runtime on iOS, although not foundation or ui. Compose runtime works on the simulator as well
r
@kpgalligan If you could take a look at the build.gradle attached in the earlier thread, that would be great!
k
Well, minus a public repro it’ll be difficult to diagnose. Looking at your error
unable to load standard library for target 'arm64-apple-ios10.0'
, it does seem like something related to M1 minimums, but hard to say. I would give this a shot (https://stackoverflow.com/a/71158108) and see if that does anything.
Where do you get this error, btw? If its in Xcode trying to compile swift, then seeing your Podfile and other dependencies may be useful (as in it may have nothing to do with Kotlin specifically)