The upgrade problem

If you have upgraded to Xcode13.0, you may experience the following problems

❌ The Legacy Build System will be removed in a future release. You can configure the selected build system and this deprecation message in File > Workspace Settings.

The solution

1. In Xcode->File->Project Settings/WorkSpace Settings->Build System, change it to New Build System(Default). Because Leagcy Build System(Deprecated) is officially Deprecated

2. ⚠️ In the warning, click Update to Recommended Settings according to the Valide Project Settings of the project

The Build System introduction

At the time of Xcode9’s release, Apple provided a New Build System on Build System, which can be seen in WWDC2017. Apple talked about the advantages of this Build System: lower Build costs, especially for large projects.

Of course, Apple has given developers plenty of extra time to use this new feature. In Xcode9, this build system was not set as the default build system, and apple set it as the default build system starting with Xcode10.

Xcode13 Build System new feature

  • Configuration settings (.xcconfig) files now support using \ to break long lists across multiple lines. (4405473) (FB5943765)

    For example:

    HEADER_SEARCH_PATHS = $(SRCROOT)/include \    $(SRCROOT)/include/component1 \    $(SRCROOT)/include/component2
    Copy the code
  • When you pass xcconfig files to xcodebuild using the -xcconfig command-line flag and XCODE_XCCONFIG_FILE environment variable, Xcode parses them using New Build System semantics, which also supports condition parameters. (25001734)

  • Configure frameworks to build for multiple platforms in a single build operation by setting the SUPPORTED_PLATFORMS build setting to the list of platforms you support and setting ALLOW_TARGET_PLATFORM_SPECIALIZATION to YES. (45951215)

  • You can now use platform filters in build phases and target dependencies for all supported platforms. (72240935)

  • xcodebuild now shows the target and project name for each failing command in the summary at the end of the build log when a build failure occurs. (75081458)

  • The build system now emits a warning when a script phase, or custom build rule, declares an input dependency that isn’t part of the build input and isn’t declared as an output dependency of any other task in the build. (76129954)

  • The build options sheet now includes a Dependency Order option, which replaces the Parallelize Build option, and a Manual Order option, which is deprecated, but included for legacy compatibility. (76251439)

reference

  1. Developer.apple.com/videos/play…
  2. Blog.csdn.net/TuGeLe/arti…
  3. Developer.apple.com/documentati…