Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit 2d74669

Browse files
authored
Enhance Xcode project generation diagnostics
Updated the Xcode project generation step with improved diagnostics and removed verbose flag.
1 parent 206513a commit 2d74669

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

.github/workflows/build-unsigned-ipa.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
echo "project.yml (first 200 lines):"
9191
sed -n '1,200p' project.yml || true
9292
93-
- name: Generate Xcode Project
93+
- name: Generate Xcode Project (robust + diagnostics)
9494
shell: /bin/bash {0}
9595
run: |
9696
set -euo pipefail
@@ -113,19 +113,20 @@ jobs:
113113
fi
114114
fi
115115
116-
echo "=== running xcodegen generate --spec project.yml --verbose ==="
116+
echo "=== running xcodegen generate --spec project.yml ==="
117117
set +e
118-
xcodegen generate --spec project.yml --verbose
118+
xcodegen generate --spec project.yml
119119
rc=$?
120120
set -e
121121
122122
if [ $rc -ne 0 ]; then
123123
echo "❌ xcodegen exited with code $rc — collecting diagnostics..."
124124
125125
echo "---- macOS unified log for xcodegen (last 5m) ----"
126-
log show --style syslog --predicate 'process == \"xcodegen\"' --last 5m || true
126+
# safer predicate: search event messages for xcodegen (best-effort)
127+
log show --style syslog --predicate 'eventMessage CONTAINS "xcodegen"' --last 5m || true
127128
128-
echo "---- Recent DiagnosticReports ----"
129+
echo "---- Recent DiagnosticReports (possible crash logs) ----"
129130
ls -la ~/Library/Logs/DiagnosticReports | tail -n 20 || true
130131
131132
echo "---- /var/log/system.log (tail) ----"
@@ -135,9 +136,9 @@ jobs:
135136
echo "Attempting: brew reinstall xcodegen (then retry once)..."
136137
brew reinstall xcodegen || brew install xcodegen || true
137138
138-
echo "Retrying xcodegen generate --spec project.yml --verbose (one retry)..."
139+
echo "Retrying xcodegen generate --spec project.yml (one retry)..."
139140
set +e
140-
xcodegen generate --spec project.yml --verbose
141+
xcodegen generate --spec project.yml
141142
retry_rc=$?
142143
set -e
143144
@@ -153,13 +154,17 @@ jobs:
153154
154155
echo ""
155156
echo "Possible causes:"
156-
echo "- xcodegen binary is crashing due to incompatible architecture (ARM vs x86_64)."
157-
echo "- Corrupt xcodegen install or an OS-level incompatibility."
157+
echo "- xcodegen invocation failed due to invalid flag or spec syntax (we removed the bad flag)."
158+
echo "- Architecture mismatch (xcodegen is ARM vs expecting x86_64) — unlikely now since binary is arm64."
159+
echo "- Corrupt install or runner environment oddness."
158160
echo ""
159-
echo "Quick diagnostics to check in the logs above:"
160-
echo " file $(which xcodegen) # check binary arch"
161+
echo "Quick checks you can find in the logs above:"
162+
echo " file $(which xcodegen) # binary arch"
161163
echo " xcodegen --version"
162-
echo " arch -x86_64 xcodegen generate --spec project.yml # try forcing x86_64 (if Rosetta available)"
164+
echo ""
165+
echo "If you still hit issues, try:"
166+
echo " - Forcing x86_64: arch -x86_64 xcodegen generate --spec project.yml (only if Rosetta is available)"
167+
echo " - Switching runner image: runs-on: macos-latest (or macos-12)"
163168
echo ""
164169
exit $rc
165170
fi

0 commit comments

Comments
 (0)