So our project has a bunch of dependencies that come in via Carthage. Starting with 0.37.0, they have support for XCFrameworks, when I went to do an update it suggested I build an XCFramework instead and I added the flag and built. Thought 'alright!'
But then we have 3 dependencies that come in via Swift Package Manager.
As is documented in many places, if I just try and run this on the sim, I get an error that the first aws dependency was not built for this architecture, so I add this:
Then it will build, however, once I get to the linking phase, one of the Package Manager dependencies spits out the error:
Could not find module 'PartialSheet' for target
'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator
For now I have found no solution to this. I am assuming that the simulators that run the phone are intel based and the Package Manager is not building the x86_64 variant. I cannot figure out how to tell it to make it. I did find that if I run on the Mac simulator:
it works.
I fiddled around with VALID_ARCHS and trying to set that to just the 2 arm variants but that didn't work. In part because again, the problem is in the dependencies built by SPM. My guess is that the shown project needs to get their project to work with M1 is the answer.
Update
I still don't know why it's looking for the x86_64 variant to run a sim on an M1 machine, but in doing some other build stuff tonight, I did realize this should not be happening at all because SPM should be building these dependencies as xcframeworks, no? Carthage is now doing that and you don't need to use lipo anymore: the xcframework has all the platofrm variants.

