Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PBXBuildFile vs PBXFileReference section

What is the difference between PBXBuildFile and PBXFileReference in project.pbxproj? Does it matter if a file is listed in both of the sections? What is the policy what file in which section should get?

/* Begin PBXBuildFile section */
        3D081B83146ACE36000CC86B /* B767.png in Resources */ = {isa = PBXBuildFile; fileRef = 3D081B82146ACE36000CC86B /* B767.png */; };

/* Begin PBXFileReference section */
        3D081B82146ACE36000CC86B /* B767.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = B767.png; sourceTree = "<group>"; };
like image 863
János Avatar asked Aug 28 '12 09:08

János


1 Answers

You should normally never have to worry about this, but it can come up in certain merge conflicts in the project.pbxproj file.

A PBXFileReference is a reference to the actual file. It's the object that backs up the files that appear in the left-hand project view.

A PBXBuildFile is a file in a target. It wraps a PBXFileReference and adds certain attributes like per-file compiler flags. If a file is added to a target, it will be listed in both sections. If a file is in more than one target, it will have more than one PBXBuildFile in the build files section.

like image 85
John Graziano Avatar answered Nov 03 '22 21:11

John Graziano