Skip to content

Add Xcode 27.0 project format, validate projectFormat and default xcodeVersion to 16.0 - #1658

Merged
yonaskolb merged 2 commits into
masterfrom
xcode27-project-format
Oct 13, 2026
Merged

yonaskolb merged 2 commits into
masterfrom
xcode27-project-format

Conversation

@yonaskolb

Copy link
Copy Markdown
Owner

Three related changes to project format and version handling. Follows on from #1648, which added xcode26_3.

Add xcode27_0 project format

Adds projectFormat: xcode27_0, which writes objectVersion = 110 and preferredProjectObjectVersion = 110, with no compatibilityVersion. This is the same shape as xcode16_0, xcode16_3 and xcode26_3.

How the values were checked against Xcode 27.0 (27A266a), without the GUI:

  • Object version 110 and the name "Xcode 27.0" (verified): PBXProject.configureBuiltInProjectFormats() in DevToolsCore.framework registers each format with initWithArchiverVersion:identifier:explicitDisplayName:…. Disassembling it gives the archiver versions 42…56, 60, 63, 70–76 (the obsolete intermediate formats), 77, 90, 100 and 110. The last one, 110, is registered with display name "Xcode 27.0" and identifier XcodeProjectFormatIDv27_0, and it is not marked obsolete. A separate internal check (XCSchema.assignLatestFormat) also compares against 110 as the latest format.
  • No compatibilityVersion, preferredProjectObjectVersion written instead (verified): +[PBXProject archivableKeysToBeSkippedByPListArchiver:] skips compatibilityVersion for archive versions >= 72, and skips preferredProjectObjectVersion below that. preferredProjectObjectVersion is the preferred format's archiver version, so a project in the Xcode 27.0 format has 110.
  • Xcode accepts it (verified): hand-editing a generated project shows that xcodebuild accepts 100 and 110 and rejects 101–109 and 111–200 with "written by a different version of Xcode". A project generated with projectFormat: xcode27_0 by this branch lists and builds with Xcode 27.0's xcodebuild.
  • Project Format menu label (inferred): the menu shows each format's display name, so it should read "Xcode 27.0". This wasn't checked in the GUI.

tuist/XcodeProj (9.17.5) has no format constants for this, so nothing is needed there.

The default projectFormat stays xcode16_0. Xcode 27's own +[PBXProject _defaultFormat] still returns the Xcode 16.0 format.

Validate projectFormat

Before this change, an unknown options.projectFormat (for example a typo, or xcode27) silently fell back to the default format. It is now a spec validation error:

Spec validation error: Invalid projectFormat "xcode27". Valid values are: xcode27_0, xcode26_3, xcode16_3, xcode16_0, xcode15_3, xcode15_0, xcode14_0

To make this possible, ProjectFormat moves from XcodeGenKit to ProjectSpec, next to SpecValidation. ProjectSpec can't depend on XcodeGenKit. The enum is now CaseIterable, so the error can list the valid values. XcodeGenKit keeps public typealias ProjectFormat = ProjectSpec.ProjectFormat, so existing code that refers to ProjectFormat through XcodeGenKit still compiles. Project.projectFormat still falls back to the default for library users who generate without calling validate().

Default xcodeVersion to 16.0

The default options.xcodeVersion changes from 14.3 to 16.0, to match the default projectFormat (xcode16_0). This changes LastUpgradeCheck in generated projects and LastUpgradeVersion in generated schemes from 1430 to 1600. Set options.xcodeVersion to keep the old value. The docs now state the default.

Fixture impact: the regenerated fixtures (scripts/gen-fixtures.sh, plus the scheme_test fixture written by SchemeGeneratorTests) differ only on those lines. That's 5 LastUpgradeCheck = 1430 → 1600 and 18 LastUpgradeVersion = "1430" → "1600".

Tests

  • testXcode27_0ProjectFormat in PBXProjGeneratorTests, in the same style as testXcode26_3ProjectFormat
  • testDefaultLastUpgradeCheckWhenUserDidNotSpecifyValue now asserts 1600 explicitly
  • Validation specs for an invalid projectFormat (including the message) and for every valid value

🤖 Generated with Claude Code

yonaskolb and others added 2 commits October 13, 2026 21:07
…deVersion to 16.0

- Add `xcode27_0` `ProjectFormat` (objectVersion 110, preferredProjectObjectVersion 110, no compatibilityVersion)
- Move `ProjectFormat` into ProjectSpec (with a typealias in XcodeGenKit) so spec validation can report unknown `projectFormat` values
- Default `xcodeVersion` to 16.0 and regenerate fixtures

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yonaskolb
yonaskolb merged commit 783a19e into master Oct 13, 2026
6 checks passed
@yonaskolb
yonaskolb deleted the xcode27-project-format branch October 13, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant