用途:安全地编辑 XcodeGen 规格文件、重新生成 Xcode 工程,并验证生成的构建设置与 target。
主要能力:定位规格文件(project.yml 或自定义 --spec);在规格中编辑 target、设置、依赖与 scheme;重新生成工程;校验生成的 .xcodeproj 与构建设置。
使用方式:在仓库根目录执行 xcodegen 重新生成;自定义规格路径用 xcodegen --spec path/to/spec.yml;仅生成 plist 用 xcodegen --only-plists。
编辑要点:以 project.yml 为唯一事实来源,避免手动改 .xcodeproj,如必须修改需同步回规格。新增 target 时定义 type、platform、sources,必要时显式设置 settings.base.PRODUCT_BUNDLE_IDENTIFIER。Info.plist/entitlements 优先用 info: / entitlements: 块,注意 info 生成可能覆盖已有 plist 内容。依赖使用 target: 条目,仅在需要嵌入时(应用、扩展)设 embed: true。scheme 需要显式控制时在 schemes: 中使用 targets:<name>: all。完整语法见 references/spec.md。
校验清单:重新生成后确认 target 产品类型、bundle ID、构建设置与嵌入 target;若因缺少 plist/entitlements 构建失败,检查规格中的 info 与 entitlements 路径;若在 Xcode UI 中做过修改,需先同步回规格再重新生成。
限制:资料未提供更多平台、收费或效果信息。