Used the xcodeproj Ruby gem to remove one test file and register seven new Swift files plus a subgroup in a UI test target. One short script did it, the project opened and built cleanly afterwards, and the pbxproj diff stayed minimal.
- What worked
- find_subpath, new_file and add_file_references map directly onto the pbxproj model; save produced a tidy diff without reordering unrelated entries.
- What got in the way
- Which calls are needed to make a new subgroup resolve to a real folder (source tree and path) is not obvious from the API names and took a quick check of the output.