Socket
Socket
Sign inDemoInstall

xcode

Package Overview
Dependencies
Maintainers
2
Versions
1212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xcode - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

test/LibrarySearchPaths.js

6

lib/pbxFile.js

@@ -86,4 +86,10 @@ var path = require('path'),

this.settings = { ATTRIBUTES: ['Weak'] };
if (opt.compilerFlags) {
if (!this.settings)
this.settings = {};
this.settings.COMPILER_FLAGS = opt.compilerFlags;
}
}
module.exports = pbxFile;

32

lib/pbxProject.js

@@ -234,3 +234,3 @@ var util = require('util'),

this.addToPbxFrameworksBuildPhase(file); // PBXFrameworksBuildPhase
this.ensureCorrectSearchPaths(file); // make sure it gets built!
this.addToLibrarySearchPaths(file); // make sure it gets built!

@@ -447,6 +447,8 @@ return file;

pbxProject.prototype.ensureCorrectSearchPaths = function (file) {
pbxProject.prototype.removeFromLibrarySearchPaths = function (file) {
var configurations = nonComments(this.pbxXCBuildConfigurationSection()),
INHERITED = '"$(inherited)"',
SEARCH_PATHS = 'LIBRARY_SEARCH_PATHS',
config, buildSettings, searchPaths;
var new_path = searchPathForFile(file, this);

@@ -459,2 +461,26 @@ for (config in configurations) {

if (buildSettings[SEARCH_PATHS]) {
var matches = buildSettings[SEARCH_PATHS].filter(function(p) {
return p.indexOf(new_path) > -1;
});
matches.forEach(function(m) {
var idx = buildSettings[SEARCH_PATHS].indexOf(m);
buildSettings[SEARCH_PATHS].splice(idx, 1);
});
}
}
}
pbxProject.prototype.addToLibrarySearchPaths = function (file) {
var configurations = nonComments(this.pbxXCBuildConfigurationSection()),
INHERITED = '"$(inherited)"',
config, buildSettings, searchPaths;
for (config in configurations) {
buildSettings = configurations[config].buildSettings;
if (unquote(buildSettings['PRODUCT_NAME']) != this.productName)
continue;
if (!buildSettings['LIBRARY_SEARCH_PATHS']) {

@@ -490,3 +516,3 @@ buildSettings['LIBRARY_SEARCH_PATHS'] = [INHERITED];

if (file.path == filePath) {
if (file.path == filePath || file.path == ('"' + filePath + '"')) {
return true;

@@ -493,0 +519,0 @@ }

2

package.json

@@ -5,3 +5,3 @@ {

"description": "parser for xcodeproj/project.pbxproj files",
"version": "0.6.0",
"version": "0.6.1",
"main":"index.js",

@@ -8,0 +8,0 @@ "repository": {

@@ -25,4 +25,19 @@ # node-xcode

## Working on the parser
If there's a problem parsing, you will want to edit the grammar under
`lib/parser/pbxproj.pegjs`. You can test it online with the PEGjs online thingy
at http://pegjs.majda.cz/online - I have had some mixed results though.
Tests under the `test/parser` directory will compile the parser from the
grammar. Other tests will use the prebuilt parser (`lib/parser/pbxproj.js`).
To rebuild the parser js file after editing the grammar, run:
./node_modules/.bin/pegjs lib/parser/pbxproj.pegjs
(easier if `./node_modules/.bin` is in your path)
## License
MIT

@@ -194,3 +194,11 @@ var pbxFile = require('../lib/pbxFile');

test.done();
},
'should be {COMPILER_FLAGS:"blah"} if compiler flags specified': function (test) {
var sourceFile = new pbxFile('Plugins/BarcodeScanner.m',
{ compilerFlags: "-fno-objc-arc" });
test.deepEqual({COMPILER_FLAGS:"-fno-objc-arc"}, sourceFile.settings);
test.done();
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc