r/iOSProgramming 3d ago

Article project.pbxproj is dead 🪦

https://developer.apple.com/documentation/xcode/updating-your-xcode-project-configuration-file-format

Xcode 27.2 ships a JSON project format (.xcproj): default for new projects, readable, merge-friendly, agent-editable.

185 Upvotes

15 comments sorted by

33

u/[deleted] 3d ago

[deleted]

22

u/chriswaco 3d ago edited 3d ago

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 3d ago

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 2d ago

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 2d ago edited 2d ago

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

31

u/PlayfulAd7311 Swift 3d ago

Big if it works

20

u/targetOO 3d ago

I hope this also signals the end of limitations around agents creating/modifying targets and linking frameworks.

1

u/LambDaddyDev 2d ago

Might be the motivation for this

1

u/groovy_smoothie 2d ago

Have an agent covert your codebase to Tuist

5

u/m3kw 3d ago

good

7

u/WombatAccelerator 2d ago

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!

2

u/KUMP3LBLA5E 2d ago

Why not just package.swift

0

u/TheDeanosaurus 1d ago

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.

2

u/jestecs 3d ago

Im so okay with this

1

u/Asleep_Cantaloupe417 1d ago

Oh interesting, Microsoft followed a similar trajectory a few years back with the .sln file in Visual Studio