Skip to content
Merged
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test/
2 changes: 0 additions & 2 deletions lib/pbxFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ function correctPath(file, filepath) {
return 'System/Library/Frameworks/' + filepath;
} else if (file.lastType == DYLIB) {
return 'usr/lib/' + filepath;
} else if (file.customFramework == true) {
return file.basename;
} else {
return filepath;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/pbxProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ function correctForFrameworksPath(file, project) {
}

function searchPathForFile(file, proj) {
var plugins = proj.pbxGroupByName('Plugins')
var plugins = proj.pbxGroupByName('Plugins'),
pluginsPath = plugins ? plugins.path : null,
fileDir = path.dirname(file.path);

Expand All @@ -731,7 +731,7 @@ function searchPathForFile(file, proj) {
if (file.plugin && pluginsPath) {
return '"\\"$(SRCROOT)/' + unquote(pluginsPath) + '\\""';
} else if (file.customFramework && file.dirname) {
return '"' + file.dirname + '"'
return '"\\"' + file.dirname + '\\""';
} else {
return '"\\"$(SRCROOT)/' + proj.productName + fileDir + '\\""';
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Andrew Lunny <[email protected]>",
"name": "xcode",
"description": "parser for xcodeproj/project.pbxproj files",
"version": "0.6.3",
"version": "0.6.6",
"main":"index.js",
"repository": {
"url": "https://github.com/alunny/node-xcode.git"
Expand Down
6 changes: 3 additions & 3 deletions test/addFramework.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ exports.addFramework = {
test.equal(newFile.basename, 'Custom.framework');
test.equal(newFile.dirname, '/path/to');
// XXX framework has to be copied over to PROJECT root. That is what XCode does when you drag&drop
test.equal(newFile.path, 'Custom.framework');
test.equal(newFile.path, '/path/to/Custom.framework');


// should add path to framework search path
var frameworkPaths = frameworkSearchPaths(proj);
expectedPath = '"/path/to"';

expectedPath = '"\\"/path/to\\""';
for (i = 0; i < frameworkPaths.length; i++) {
var current = frameworkPaths[i];
test.ok(current.indexOf('"$(inherited)"') >= 0);
Expand Down