Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addToLibraryHeaderSearchPaths - handle non-inherited single values #96

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
21 changes: 12 additions & 9 deletions lib/pbxProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ pbxProject.prototype.addResourceFile = function(path, opt, group) {
file = this.addPluginFile(path, opt);
if (!file) return false;
} else {
file = new pbxFile(path, opt);
file = new pbxFile(path, opt);
if (this.hasFile(file.path)) return false;
}

Expand All @@ -241,10 +241,10 @@ pbxProject.prototype.addResourceFile = function(path, opt, group) {
correctForResourcesPath(file, this);
file.fileRef = this.generateUuid();
}

this.addToPbxBuildFileSection(file); // PBXBuildFile
this.addToPbxResourcesBuildPhase(file); // PBXResourcesBuildPhase

if (!opt.plugin) {
this.addToPbxFileReferenceSection(file); // PBXFileReference
if (group) {
Expand All @@ -253,9 +253,9 @@ pbxProject.prototype.addResourceFile = function(path, opt, group) {
else {
this.addToResourcesPbxGroup(file); // PBXGroup
}

}

return file;
}

Expand All @@ -279,7 +279,7 @@ pbxProject.prototype.removeResourceFile = function(path, opt, group) {
}
else {
this.removeFromResourcesPbxGroup(file); // PBXGroup
}
}
this.removeFromPbxResourcesBuildPhase(file); // PBXResourcesBuildPhase

return file;
Expand Down Expand Up @@ -1167,9 +1167,12 @@ pbxProject.prototype.addToLibrarySearchPaths = function(file) {
if (unquote(buildSettings['PRODUCT_NAME']) != this.productName)
continue;

if (!buildSettings['LIBRARY_SEARCH_PATHS']
|| buildSettings['LIBRARY_SEARCH_PATHS'] === INHERITED) {
buildSettings['LIBRARY_SEARCH_PATHS'] = [INHERITED];
if (!buildSettings['LIBRARY_SEARCH_PATHS']) {
buildSettings['LIBRARY_SEARCH_PATHS'] = [INHERITED];
}

if (typeof buildSettings['LIBRARY_SEARCH_PATHS'] === 'string') {
buildSettings['LIBRARY_SEARCH_PATHS'] = [buildSettings['LIBRARY_SEARCH_PATHS']];
}

if (typeof file === 'string') {
Expand Down