Hi all, I’m working with a large iOS app codebase that includes a mix of dependency types, including Carthage-built XCFrameworks and a number of older fat binary frameworks. The app’s build settings include EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64
, allowing continued use of the older dependencies in Xcode 12 and later. As a result, when we run the app locally, it opens via Rosetta in an x86_64-based simulator.
We’re attempting to begin moving some dependencies over to SPM, but developers using ARM-based Macs now have a problem when building for the simulator. The SPM-based dependency build products are arm64
-based, while those for the app are x86_64
-based, due to the EXCLUDED_ARCHS
setting mentioned above.
So for our developers using ARM-based Macs, builds are failing on import SomeDependency
with the following:
Could not find module ‘SomeDependency’ for target ‘x86_64-apple-ios-simulator’; found: arm64, arm64-apple-ios-simulator
I haven’t found a way to get around this. Changing the Build Active Architecture Only
build setting seemed potentially promising, but didn’t make a difference for SPM dependency builds in derived data. Is there a way I’ve missed that would force Xcode to produce “universal” SPM dependency builds?