Xcode 12 发布说明中提到:
构建设置编辑器不再包括Valid Architectures构建设置(VALID_ARCHS),并且不建议使用它。相反,有一个新的Excluded Architectures构建设置(EXCLUDED_ARCHS)。如果项目包括VALID_ARCHS,则该设置会显示在构建设置编辑器的用户定义部分中。
https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes。
Deprecations
The Build Settings editor no longer includes the Valid Architectures build setting (VALID_ARCHS), and its use is discouraged. Instead, there is a new Excluded Architectures build setting (EXCLUDED_ARCHS). If a project includes VALID_ARCHS, the setting is displayed in the User-Defined section of the Build Settings editor. (15145028)
The legacy build system is deprecated, and will be removed in a future release. (62742902)
我将此设置的值更改为true
,然后它对我起作用了:
Build Active Architecture Only