PBXBuildFile vs PBXFileReference section
Asked Answered
O

1

10

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>"; };
Overdraw answered 28/8, 2012 at 9:16 Comment(0)
A
25

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.

Ailbert answered 5/10, 2012 at 23:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.