Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode - Editing xcodeproj bundle (specifically project.pbxproj)

Tags:

xcode

projects

I'm working in XCode and I've also written an external editor tool that generates resources for use in the project. In the best case scenario, the tool would edit the project.pbxproj file so that it includes the generated resources in the project. I've read through the file in an attempt to understand it, and it's mostly discernible but there is still one major question I have.

If I wanted to generate a new Group from outside XCode (or a new anything, for that matter), how do I know what ID code to use? For example: 19C28FACFE9D520D11CA2CBB is one of them from my project. How am I supposed to know what to use if I make my own? Do they just need to be unique? Would it be legal to just make one up: 000000000000000000000001 and 000000000000000000000002 and 000000000000000000000003 etc. ?

Any help on this would be wonderful. Thanks.

like image 930
Eli Avatar asked Jun 04 '09 19:06

Eli


People also ask

What is Xcodeproj project Pbxproj?

The project. pbxproj file contains metadata like settings, file references, configuration, and targeted platforms which Xcode uses to build your project. Whenever you add, move, delete or rename a file / folder in Xcode (among other things), it will result in project.

How do I open a project Pbxproj file?

Right click your . xcodeproj file and "Show Package Contents". Then open project. pbxproj file with TextEdit and duplicate.

How to compare two projects in Xcode?

To compare changes in one source file, open the file and click the Enable Code Review button in the upper-right corner of the Xcode window. The comparison view highlights changes between the current source code and the most recent commit.


1 Answers

Yes, you can make your own. The best way would be to use a hash function such as MD5 or SHA1 to generate it then you can truncate it at the desired length. I would hash the name of the file/group along with a time stamp appended this way you get a more unique result.

like image 55
JD Frias Avatar answered Oct 03 '22 02:10

JD Frias