My company's iPhone/ipad product has migrated through several generations of iOS and Xcode (now at 5.1 and 4.3), and has many targets. Perhaps because of these factors, there are many identical lines for each source file in the PBXBuildFile section, e.g:
14EE4CD315A5E69000DCA763 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 14EE4CB615A5E68500DCA763 /* [email protected] */; }; 14EE4CD415A5E69000DCA763 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 14EE4CB615A5E68500DCA763 /* [email protected] */; }; 14EE4CD515A5E69000DCA763 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 14EE4CB615A5E68500DCA763 /* [email protected] */; }; 14EE4CD615A5E69000DCA763 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 14EE4CB615A5E68500DCA763 /* [email protected] */; }; 14EE4CD715A5E69000DCA763 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 14EE4CB615A5E68500DCA763 /* [email protected] */; };
Note that the lines for a given source file are all absolutely (I was wrong, they are not quite...) identical, and the number of duplicate lines varies from none to a half dozen or more. Because of this duplication, the project.pbxproj's PBXBuildFile section is almost 5000 lines long, though we really only have about 1200 unique files.
Before I cobble up a script to strip all these duplicate lines, and ask test for full regression on all builds and targets, I'd like to be sure that Xcode doesn't need these duplicate lines for some arcane reason.
I'm fairly certain that this wasn't caused by flubbed version control; duplicate lines only appear in the PBXBuildFile section and while I'm not fond of P4, we have little trouble merging project.pbxproj file changes, though at nearly 20,000 lines, it's a bit unwieldy. I think some release of Xcode did this, perhaps while adding new targets, but I've not found anyone else complaining about the issue.
Secondary questions: How did this happen? Has anyone else found these kind of duplicate lines?