stack overflow上的答案,简单来说把VALID_ARCHS删了可能就解决了
https://stackoverflow.com/questions/63391793/xcode-12-build-target-in-wrong-order/63405201#63405201
update Apple's Feedback on VALID_ARCHS
After reviewing your feedback, we have some additional information for you:
Xcode does not add VALID_ARCHS to your project. Indeed, we recommend against using VALID_ARCHS. Maybe some CocoaPod is setting it in your project for some reason? CocoaPods are not part of Xcode so, we don’t have any control over what they do.
One thing to note is that in Xcode 11 VALID_ARCHS showed up under the architectures section. Since we are strongly recommending against using it, it no longer shows up there and now appears in the User Defined section if it is defined at all.
Xcode 11 used to automatically translate building for arm64 for the simulator into building for x86_64, but now that arm64 is a valid simulator architecture (it’s the Apple Silicon architecture), that translation no longer occurs.
So, we suspect what you should do is delete VALID_ARCHS from your project altogether, and make sure Architectures (ARCHS) is set to Standard Architectures (ARCHS_STANDARD) and not to something specific (unless you really know exactly why you’re not using ARCHS_STANDARD).