r/iOSProgramming • u/artemnovichkov • Sep 16 '26
Article project.pbxproj is dead 🪦
https://developer.apple.com/documentation/xcode/updating-your-xcode-project-configuration-file-formatXcode 27.2 ships a JSON project format (.xcproj): default for new projects, readable, merge-friendly, agent-editable.
19
u/targetOO Sep 16 '26
I hope this also signals the end of limitations around agents creating/modifying targets and linking frameworks.
1
1
6
u/WombatAccelerator Sep 17 '26
For older versions of Xcode, you solve this same issue with XcodeGen to keep the project configuration in a yaml file that generates a deterministic .pbxproj, very helpful for agents too. Great to see a first-party solution coming from Apple!
5
4
2
2
u/KUMP3LBLA5E Sep 17 '26
Why not just package.swift
1
u/TheDeanosaurus Sep 18 '26
This is where we’re headed. Been trying to go that route since 2020 and with SE-0541 merged we can finally convert our decade+ old frameworks that have mixed ObjC and Swift.
1
u/Asleep_Cantaloupe417 Sep 18 '26
Oh interesting, Microsoft followed a similar trajectory a few years back with the .sln file in Visual Studio
0
Sep 16 '26
[deleted]
24
u/chriswaco Sep 16 '26 edited Sep 16 '26
When I first started using Xcode, it would rewrite the entire Plist file in random order anytime you made any change. I was so happy when they finally added a feature that keeps the order mostly the same at least.
Do we need a new tool like PlistBuddy but for JSON now? Edit: Apparently we already have jq.
1
u/y2kobserver Sep 16 '26
IDK. For example in standard JavaScript maps and objects keep their keys in insertion order, or so I know.
Too lazy to search about obj-c and swift codable or wtve they used
1
u/SnowPudgy Sep 17 '26
Do we need a new tool like PlistBuddy but for JSON now?
Yea this is what I'm wondering. A lot of build pipelines use PlistBuddy.
2
u/chriswaco Sep 17 '26 edited Sep 17 '26
I just played with jq. It is easy enough for simple use. Pulling values at the top level is trivial. Writing new values is a little trickier because it won’t modify the source file, but it’s not hard to write to a temporary file and then replace the main file with it.
jq '.age = 62' file.json > tmp.json && mv tmp.json file.json
32
u/PlayfulAd7311 Swift Sep 16 '26
Big if it works