Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Cloud Testing fails to archive project

I have errors with Xcode Cloud testing while archiving. Issues are all related to CocoaPods dependencies:

unable to open file (in target "Alamofire" in project "Pods")
missing module map file: '/Volumes/workspace/repository/Pods/Target Support Files/Alamofire/Alamofire.modulemap

Looks like Pods are not being installed on archiving. It works well locally.

Best,

like image 460
xGoPox Avatar asked Mar 11 '26 22:03

xGoPox


1 Answers

Xcode Cloud temporary build environment doesn't include third party tools like CocoaPods. But you can include them using post clone script. Here are the steps if you are using CocoaPods.

  1. Create a directory ci_scripts at the root of your project.

  2. Add a file ci_post_clone.sh and save it in the ci_scripts directory.

  3. Open Terminal and make your script executable be running chmod +x ci_post_clone.sh in ci_scripts directory.

  4. Edit the ci_post_clone.sh in any text editor and copy the following.

     # !/bin/sh
    
     # Install CocoaPods using Homebrew.
     brew install cocoapods
    
     # Install dependencies you manage with CocoaPods.
     pod install
    
  5. Commit and push ci_post_clone.sh.

like image 89
Bilal Avatar answered Mar 13 '26 13:03

Bilal