iOS XcodeGen
Overview
Use this skill to safely edit XcodeGen specs, regenerate the Xcode project, and verify the resulting build settings/targets.
Workflow (default)
- Locate the spec (
project.ymlor custom--spec). - Edit targets/settings/dependencies/schemes in the spec.
- Regenerate with
xcodegen. - Validate the generated
.xcodeproj/build settings.
Quick Commands
- Regenerate in repo root:
xcodegen - Custom spec path:
xcodegen --spec path/to/spec.yml - Only plists:
xcodegen --only-plists
Editing Guidance
- Treat
project.ymlas source of truth. Avoid manual edits in.xcodeprojunless explicitly requested; if you must, sync changes back into the spec. - When adding targets, define
type,platform,sources, and explicitsettings.base.PRODUCT_BUNDLE_IDENTIFIERwhen needed. - For Info.plist/entitlements, prefer
info:/entitlements:blocks so XcodeGen writes files deterministically. Be awareinfogeneration can overwrite existing plist contents. - For dependencies, use
target:entries withembed: trueonly when embedding is required (apps, extensions). - For schemes, use
targets:<name>: allinschemes:when you need explicit control.
Reference
- For full spec syntax, property definitions, and examples, read
references/spec.md.
Validation Checklist
- After regeneration, confirm target product types, bundle IDs, build settings, and embedded targets.
- If build fails due to missing plist/entitlements, check
infoandentitlementspaths in the spec. - If Xcode UI changes were made, reconcile and move them into the spec before regenerating again.