Skip to content

Commit 9037588

Browse files
committed
addProductFile: Remove creation of fileReference & buildFile entries - only add file to "Products" group
1 parent 8b3c7f6 commit 9037588

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/pbxProject.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ pbxProject.prototype.addProductFile = function(targetPath, opt) {
113113

114114
file.includeInIndex = 0;
115115
file.fileRef = this.generateUuid();
116+
file.target = opt ? opt.target : undefined;
117+
file.group = opt ? opt.group : undefined;
116118

117-
this.addToPbxFileReferenceSection(file); // PBXFileReference
118119
this.addToProductsPbxGroup(file); // PBXGroup
119120

120121
return file;
@@ -123,7 +124,6 @@ pbxProject.prototype.addProductFile = function(targetPath, opt) {
123124
pbxProject.prototype.removeProductFile = function(path, opt) {
124125
var file = new pbxFile(path, opt);
125126

126-
this.removeFromPbxFileReferenceSection(file); // PBXFileReference
127127
this.removeFromProductsPbxGroup(file); // PBXGroup
128128

129129
return file;

0 commit comments

Comments
 (0)