Can't compile library against arm64 simulator

Hello World. My team and I are developing a Mastodon client in SwiftUI, and we're using a third-party UIKit library called Atributika for converting HTML content into NSAttributedStrings that we then display as posts.

Until Wednesday, everything was fine. Everything compiled without any problem. We're almost done with this app, but since we updated to Xcode beta3, we can't test our changes because the compilation will fail with the following error:

Code Block
Command CompileSwift failed with a nonzero exit code:
Could not find module 'Atributika' for target 'arm64-apple-ios-simulator'; found: x86_64-apple-ios-simulator, x86_64


I guess this is caused by Xcode beta 3 now being combined with the new Universal Xcode thingy that was previously bundled as a different download, since it's trying to compile it for the arm64 iOS simulator.

Yesterday we found out that you can compile to a physical device without any problem, so we can at least test our changes, but it's still really annoying since we can't use the new Previews, nor the simulator. We can't even use the On-device previews, so we spend a lot of time in compiling the apps and then installing them on our devices.

Is there any way we can fix this? Changing VALID_ARCHS to arm64 arm64e i386 x86_64 doesn't work.

Thanks in advance. :D




Accepted Reply

Ok so for anyone who has the same problem as me, apparently, with the new arm-based iOS simulator being bundled with the new Xcode beta (beta 3), you need to enable Build Active Architecture Only so that it doesn't try to build your app for the arm-based simulator on Intel-based Macs.

I guess this may also apply to arm-based Macs trying to compile to the x86_64 based simulator.

Replies

Ok so for anyone who has the same problem as me, apparently, with the new arm-based iOS simulator being bundled with the new Xcode beta (beta 3), you need to enable Build Active Architecture Only so that it doesn't try to build your app for the arm-based simulator on Intel-based Macs.

I guess this may also apply to arm-based Macs trying to compile to the x86_64 based simulator.