阅读 648

Xcode13 Build System

升级问题

如果已经升级到Xcode13.0,可能会遇到如下问题

❌ 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.

解决办法

1、在Xcode->File->Project Settings/WorkSpace Settings->Build System,将其修改为New Build System(Default)。因为Leagcy Build System(Deprecated)正式弃用了

2、⚠️在警告中,按照project的Valide Project Settings点击Update to recommended settings可以按照提示解决

Build System简介

在Xcode9发布的时候,Apple在Build System上提供了新版本的构建系统(New Build System),具体可见WWDC2017,苹果讲述了该构建系统的优点:降低构建开销,尤其可以降低大型项目的构建开销。

当然对于该新特性的使用,苹果为开发者提供了足够的过度时间。在Xcode9中,该构建系统没有设置为默认的构建系统,而在Xcode10开始,苹果将该系统设置为默认的构建系统。

Xcode13 Build System 新特性

  • 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
    复制代码
  • 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)

参考文献

  1. developer.apple.com/videos/play…
  2. blog.csdn.net/TuGeLe/arti…
  3. developer.apple.com/documentati…
文章分类
iOS
文章标签