diff --git a/lib/pbxProject.js b/lib/pbxProject.js index 608c0fa..734fa2e 100644 --- a/lib/pbxProject.js +++ b/lib/pbxProject.js @@ -276,8 +276,15 @@ pbxProject.prototype.removeFromPbxFileReferenceSection = function (file) { var i; var refObj = pbxFileReferenceObj(file); for(i in this.pbxFileReferenceSection()) { - if(this.pbxFileReferenceSection()[i].name == refObj.name || - this.pbxFileReferenceSection()[i].path == refObj.path) { + var section = this.pbxFileReferenceSection()[i]; + if(section.name && section.name.indexOf('"') == -1) { + section.name = '"' + section.name + '"'; + } + if(section.path && section.path.indexOf('"') == -1) { + section.path = '"' + section.path + '"'; + } + if(section.name == refObj.name || + section.path == refObj.path) { file.fileRef = file.uuid = i; delete this.pbxFileReferenceSection()[i]; break;