-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange can't compile assets - 1
error on iOS due to missing simulator
#683
Comments
@darronschall in 0.24.0 we now have iosMinimumDeploymentTarget property that passed in actool here Line 105 in d1afd65
so maybe you configure that minimum target is 17.4? in gradle |
|
For this particular project, I have the iOS Deployment Target set in Xcode to 16.0. I'm not sure why |
@darronschall i tell not about deployment target in xcode, but about |
@Alex009 Ah, I see. No, I did not supply a value. I'm using a very minimal configuration: multiplatformResources {
resourcesPackage = "com.myapp.resources"
} |
My build server runs
./gradlew iosSimulatorArm64Test
as a GitHub action. When I added moko-resources into a new (almost empty) project, I started running into a strangecan't compile assets - 1
that took a little while to debug. This error was not happening locally for me, just on the build server.I'm not sure this is a moko-resources issue, but I'll document it here for future reference.
The error was:
... which I saw was coming from https:/icerockdev/moko-resources/blob/590fc8f2eacbe5aca4992df83aa7473b[…]rock/gradle/generator/apple/action/PackResourcesToKLibAction.kt
After remoting into the server, I tried the command with debugging info:
./gradlew iosSimulatorArm64Test --debug --stacktrace
There was a lot of output, but this was the relevant part:
That was able to point me in the right direction.
Running
xcrun simctl list devices available
showed that I had no 17.4 sims on the build server.So, I tried to create one:
xcrun simctl create "iPhone 15 (17.4)" "iPhone 15" iOS17.4
... but that failed with:Invalid runtime: iOS17.4
Opening Xcode on the Mac mini and installing iOS 17.4 SDK, then creating a simulator, did the trick. (Previously, the highest SDK available I had installed on this particular Mac Mini build server was 17.2)
Again, what's interesting is that
./gradlew iosSimulatorArm64Test
worked just fine before moko-resources was included in the project (the tests were run with one of the existing simulators).The task only started failing because the
xcrun actool Assets.xcassets --compile . --platform iphoneos --minimum-deployment-target 9.0
command was looking for the 17.4 simulator which wasn't installed... I'm not 100% sure why that is, or if there's something the moko-resources plugin can do to pick the same simulator as the multiplatform plugin to avoid erroring?Anyway, I thought this was worth sharing. I'm not sure it's a bug... but it took a bit of digging to figure out so I wanted to share my findings here should anyone else encounter the same thing in the future. 👋
The text was updated successfully, but these errors were encountered: