Section PBXBuildFile vs PBXFileReference

What is the difference between PBXBuildFile and PBXFileReference in project.pbxproj? Does it matter if the file is listed in both sections? What is the policy, which file should the partition 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>"; }; 
+4
source share
1 answer

You usually do not need to worry about this, but it can occur in certain merge conflicts in the project.pbxproj file.

A PBXFileReference is a link to the actual file. This is an object that backs up files that appear in the left view of the project.

A PBXBuildFile is the target file. It wraps PBXFileReference and adds some attributes, such as compiler flags for each file. If the file is added to the target, it will be listed in both sections. If the file is for several purposes, it will contain more than one PBXBuildFile in the assembly files section.

+10
source

All Articles