文档

​
​

Development

User Acquisition

Monetization

工业

Build Automation

DevOps

Build Automation REST API

Build Automation Editor Package

Open Unity Dashboard

Build Automation

​
​
Build Automation
  • Overview
  • Get started with Build Automation
  • Build Automation Glossary
  • Build configuration
  • Advanced build configuration
  • Run builds
  • Check build results
    • Troubleshooting Build Automation failures
      • Builds fail immediately
      • Unrecognized project error
      • Clone hangs when you use Git submodules
      • Lightmap baking
      • Android build failures
      • Errors after migration to a new Xcode version
      • macOS notarization failure
      • Problems with iOS Build Automation during XCode export
      • iOS build can't download or install from Unity Build Automation
  • Optimize build speed
  • Manage consumption costs
  • Sign build artifacts
  • Build Automation integrations
  • Build Automation API
  • Build Automation Editor Package
  • Reference
  1. Unity Build Automation
  2. Build results
  3. Troubleshoot Build Automation failures

迁移到新版 Xcode 后出现错误

Resolve errors caused by migrating to a new Xcode version.
阅读时间3 分钟
最后更新于 10 个月前

症状

从旧版 Xcode 迁移到新版本后出现错误。以下是 UBA/Xcode 日志中表明存在此问题的常见错误消息和警告:
  • 编译器因符号未找到而失败:
    • ld: symbol(s) not found for architecture arm64clang: error: linker command failed with exit code 1 (use -v to see invocation)
  • iOS 部署目标版本不受支持:
    • warning: The iOS deployment target 'IPHONEOSDEPLOYMENTTARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.1.99
  • 签名需要未选中的开发团队:
    • error: Signing for "gRPC-C++-gRPCCertificates-Cpp" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')

原因

在更改 Xcode 版本时,如果某些组件、包或插件与新版本的 Xcode 不兼容,通常会出现这些错误。

解决方案

首先,确保能够在批处理模式下使用代码仓库的全新克隆版本(无本地缓存库)进行本地构建,并且在构建 Xcode 项目时,除了在 Build Automation 目标中所做的更改之外,无需进行任何其他更改。
在批处理模式下成功进行本地构建后,确保本地使用的
cocoapods
版本与 Build Automation 中使用的版本相匹配。如果版本不匹配,请使用以下构建前脚本来安装正确的版本。以下示例适用于
cocoapods
1.12.0 版本:
注意
注意:您可以在 Unity Dashboard 的 Advanced Configuration(高级配置)选项卡中为构建目标配置构建前脚本:
gem install cocoapods -v 1.12.0echo "current cocoapods version: "gem which cocoapods
"UBA - Cocoapods 构建脚本"
要检查本地的
cocoapods
版本,请在终端中使用以下命令:
pod --version
注意
注意:确保在构建前对本地 Xcode 项目所做的任何更改,也同样应用到 Build Automation 中的项目。
您可以将
cocoapods
固定到特定版本,以确保所有构建中使用的版本保持一致。您可以使用外部工具(例如 External Dependency Manager for Unity)来执行此操作,也可以直接编辑
Dependencies.xml
文件。使用此工具时,如果指定精确版本(例如
7.0.0
)而不是表达式(例如
~> 7.0
,表示使用大于 7.0 的任何版本),则可以保证依赖包版本不会改变,避免引入任何新的错误。
如果问题仍未解决,请提交支持工单,以便支持团队可以进一步调查。要从 Unity Dashboard 提交工单,请打开 DevOps,然后选择 Help & Support(帮助与支持)> Ticket(工单)> File a ticket(提交工单)。

其他资源

  • Cocoapods 文档(外部)
  • Apple Xcode 文档(外部)

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。

  • 在本页上
    • 症状

    • 原因

    • 解决方案

    • 其他资源


报告此页面的问题