Guess what? XCode is garbage but doc can help us here.
This what I’m using to smoothly build my workflow. I’l share exact bash scripts here.
Why it’s failing?
-
First open logs on your workflow window side bar.
-
Check if you’re installing necessary dependencies before running archive process. You’re using virtual machine so any dependencies like cocoapods or yarn aren’t installed by default there.
If you haven’t read and skipped to the SOLUTION:
Here is the steps:
-
Create
ci_scripts
folder inside ios folder. -
Create 3 files inside
ci_scripts
folder:ci_post_clone.sh
ci_post_xcodebuild.sh
ci_pre_xcodebuild.sh
-
Inside your
ci_post_clone.sh
file add this:#!/bin/zsh # fail if any command fails echo "🧩 Stage: Post-clone is activated .... " set -e # debug log set -x # Install dependencies using Homebrew. This is MUST! Do not delete. brew install node yarn cocoapods fastlane # Install yarn and pods dependencies. # If you're using Flutter or Swift # just install pods by "pod install" command ls && cd .. && yarn && pod install echo "🎯 Stage: Post-clone is done .... " exit 0
-
Inside your
ci_pre_xcodebuild.sh
file add this:#!/bin/zsh echo "🧩 Stage: PRE-Xcode Build is activated .... " # You can add additional scripts here... echo "🎯 Stage: PRE-Xcode Build is DONE .... " exit 0
-
Inside your
ci_post_xcodebuild.sh
file add this:#!/bin/zsh echo "🧩 Stage: POST-Xcode Build is activated .... " # You can add additional scripts here... echo "🎯 Stage: POST-Xcode Build is DONE .... " exit 0