Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/pbxFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,12 @@ function pbxFile(filepath, opt) {
// for custom frameworks
if (opt.customFramework == true) {
this.customFramework = true;
this.dirname = path.dirname(filepath);
this.dirname = path.dirname(filepath).replace(/\\/g, '/');
}

this.path = defaultPath(this, filepath);
this.path = defaultPath(this, filepath).replace(/\\/g, '/');
this.fileEncoding = this.defaultEncoding = opt.defaultEncoding || defaultEncoding(self);


// When referencing products / build output files
if (opt.explicitFileType) {
this.explicitFileType = opt.explicitFileType;
Expand Down
2 changes: 1 addition & 1 deletion lib/pbxProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ pbxProject.prototype.removeFramework = function(fpath, opt) {
this.removeFromPbxEmbedFrameworksBuildPhase(file); // PBXCopyFilesBuildPhase

if (opt && opt.customFramework) {
this.removeFromFrameworkSearchPaths(path.dirname(fpath));
this.removeFromFrameworkSearchPaths(file.dirname);
}

return file;
Expand Down
3 changes: 2 additions & 1 deletion test/dataModelDocument.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ exports.dataModelDocument = {
test.equal(xcVersionGroupEntry.children[0], newFile.models[0].fileRef);
test.equal(xcVersionGroupEntry.currentVersion, newFile.currentModel.fileRef);
test.equal(xcVersionGroupEntry.name, path.basename(singleDataModelFilePath));
test.equal(xcVersionGroupEntry.path, singleDataModelFilePath);
// Need to validate against normalized path, since paths should contain forward slash on OSX
test.equal(xcVersionGroupEntry.path, singleDataModelFilePath.replace(/\\/g, '/'));
test.equal(xcVersionGroupEntry.sourceTree, '"<group>"');
test.equal(xcVersionGroupEntry.versionGroupType, 'wrapper.xcdatamodel');

Expand Down