Re: xcode project.pbxproj file and file references
Re: xcode project.pbxproj file and file references
- Subject: Re: xcode project.pbxproj file and file references
- From: Chris Espinosa <email@hidden>
- Date: Wed, 7 Oct 2009 17:20:11 -0700
On Oct 7, 2009, at 4:29 PM, Panayotis Katsaloulis wrote:
> I am trying to create my own hand-made project.pbxproj file for my projects, which will have an arbitrary number of source files in it.
> When playing around with this file, I found that the files are referenced through a 96-bit hex number.
>
> E.g. in PBXBuildFile section I got this entry:
> F6DBD488107D57F100BB92F5 /* lala.m in Sources */ = {isa = PBXBuildFile; fileRef = F6DBD484107D57F100BB92F5 /* lala.m */; };
>
> How can I compute this number? What does it mean?
>
> I saw that I can manually change this number to any number I want (as long there is consistency). At the moment I load this file to Xcode, the number changes again to their "default" value, without me doing something.
> Thus means that there is an algorithm which computes it. Any ideas?
Every item in the project file has a unique-in-the-project ID. That's how Build Phases record what Build Files they contain, and how Build Files relate to the File References in the project. (Since the same source file may be used in different ways in different targets, the Build File object contains the differences).
The only importance of the ID is that it correlates the Build File to the File Reference. Xcode may canonicalize the IDs when it loads the project and then write out different ones; but once written the first time, those numbers should stay stable.
So the process is to hand-roll the project file, then open it once in Xcode, then close it, and from then on go by the IDs that Xcode assigns to build files and file references.
Chris _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden