Xcode’s New .xcproj Files Are JSON
Xcode now supports a JSON-based project format (.xcproj) that’s more readable, merge-friendly, and easier for coding agents to edit. Enable it in the file inspector. Projects using .xcproj also open in earlier versions of Xcode 27. Learn more in Updating your Xcode project configuration file format.
[The] new
project.xcprojcaught my eye. What it replaces isproject.pbxproj, the build graph inside the.xcodeprojbundle, not the bundle itself.[…]
In the age of agents, the drawbacks of
pbxprojare amplified further. A great many IDs carry both object identity and cross-references, so an agent modifying a project usually has to locate the right object in a flat table, then update several mutually referencing places in step, all while trying to keep the serialized output faithful to Xcode’s conventions.[…]
From a flat ID table to a tree that mirrors the UI: instead of dumping everything into
objects, it unfolds into structures likefiles/targets/build-settings, so diffs look closer to the operations you actually performed in the interface;The direction of relationships is reversed: a file can declare which targets it belongs to via
target-membership, so adding a file no longer means editing several mutually referencing places at once;
Developers have been screaming for a friendlier Xcode project format for years. I’m one of them.
I’ve been waiting for something like this for most of my career! 🎉
It does feel like another case of “we’ve quickly done a thing to help AI that we’ve been unwilling to do for years to help humans.” I’m seeing that happen across the industry.
It is very welcome and appreciated, and lots of thanks to the teams involved. It’s also frustrating that it took “it can help AI” to make it happen.
xcode-project-formatis a Swift library for reading, writing, and manipulating Xcode’s JSON-basedproject.xcprojformat. It models the format as a rich set of value types nested under a single namespace,XCSchema, so consumers get precise, typed access to a project’s structure instead of hand-parsing JSON.The goal is to give the ecosystem a shared, accurate model of the Xcode project format — so tools like generators, linters, verifiers, and validators don’t each have to reverse-engineer the format from scratch.
Didn’t most people switch to local SPM projects anyways? Those are the new xcproj that have to be replaced with sth sensible 🙃
What the community has actually been waiting years for is a project manifest along the lines of
Package.swift: something written by people, read by people, and reviewed by people, rather than a more modern encoding of the IDE’s internal database.
Previously: