After updating to Xcode 12 the project gives me this error when building on simulator:
Could not find module 'FrameworkName' for target 'arm64-apple-ios-simulator'; found: x86_64-apple-ios-simulator, x86_64
The framework is installed with cocoapods. It works with Xcode 11. Building on "Any iOS Device" or real iPhone with Xcode 12 also works just fine. What's different in Xcode 12?
I fixed this by ensuring the build setting VALID_ARCHS
(now appearing at the bottom of Build Settings in Xcode 12) contains "x86_64
".
That is:
VALID_ARCHS = arm64, arm64e
VALID_ARCHS = arm64, arm64e, x86_64
(A little counterintuitive, as the error message says it couldn't find the module for arm64
-apple-ios-simulator, :shrug:)