Xcode Cloud Test 无法存档项目

xGo*_*Pox 3 xcode ios cocoapods xcode-cloud

我在存档时进行 Xcode 云测试时遇到错误。

问题都与 CocoaPods 依赖项相关:

unable to open file (in target "Alamofire" in project "Pods")

missing module map file: '/Volumes/workspace/repository/Pods/Target Support Files/Alamofire/Alamofire.modulemap

看起来 pod 没有安装在归档中。

它在本地运行良好。

最好的,

Bil*_*lal 7

Xcode Cloud 临时构建环境不包含 CocoaPods 等第三方工具。但您可以使用克隆后脚本包含它们。如果您使用 CocoaPods,请执行以下步骤。

  1. ci_scripts在项目的根目录中创建一个目录。

  2. 添加文件ci_post_clone.sh并将其保存在 ci_scripts 目录中。

  3. 打开并使您的脚本可执行文件在目录中Terminal运行。chmod +x ci_post_clone.shci_scripts

  4. 在任何文本编辑器中编辑ci_post_clone.sh并复制以下内容。

     # !/bin/sh
    
     # Install CocoaPods using Homebrew.
     brew install cocoapods
    
     # Install dependencies you manage with CocoaPods.
     pod install
    
    Run Code Online (Sandbox Code Playgroud)
  5. 承诺并推动ci_post_clone.sh