【问题标题】:Xcode Cloud Testing fails to archive projectXcode Cloud Testing 无法归档项目
【发布时间】:2022-01-16 22:00:55
【问题描述】:

我在存档时遇到 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。

它在本地运行良好。

最好的,

【问题讨论】:

    标签: ios xcode cocoapods xcode-cloud


    【解决方案1】:

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

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

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

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

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

       # !/bin/sh
      
       # Install CocoaPods using Homebrew.
       brew install cocoapods
      
       # Install dependencies you manage with CocoaPods.
       pod install
      
    5. 提交并推送ci_post_clone.sh

    【讨论】:

      【解决方案2】:
      猜你喜欢
      • 2020-10-28
      • 1970-01-01
      • 1970-01-01
      • 2019-02-22
      • 2022-06-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-09
      相关资源
      最近更新 更多