iOS Xcodebuild Doctor
Workflow
- •Collect context.
Capture exact
xcodebuilderror output, Xcode version, target, and scheme. - •Inspect build settings.
Run
xcodebuild -showBuildSettingsfor the failing scheme. Check deployment target, signing style, team ID, and code signing identity. - •Resolve dependency layer issues. For SPM, refresh and resolve package versions. For CocoaPods, verify Podfile lock consistency and reinstall only when needed.
- •Address cache instability. Clear DerivedData for the affected project if reproducible cache corruption is suspected. Avoid broad cache purges unless isolated cleanup fails.
- •Rebuild and verify. Run clean build and archive commands. Document exact command set that now passes.
Output Contract
Always provide:
- •Root cause and fix location.
- •Which cache or dependency action was taken and why.
- •Final
xcodebuildcommand that succeeds. - •Remaining signing or environment prerequisites.