Socket
Socket
Sign inDemoInstall

xcode

Package Overview
Dependencies
Maintainers
4
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.8.3 to 0.8.4

23

lib/pbxFile.js

@@ -113,3 +113,3 @@ var path = require('path'),

function detectSourcetree(fileRef) {
var filetype = fileRef.lastKnownFileType || fileRef.explicitFileType,

@@ -121,7 +121,7 @@ sourcetree = SOURCETREE_BY_FILETYPE[unquoted(filetype)];

}
if (fileRef.customFramework) {
return DEFAULT_SOURCETREE;
}
if (!sourcetree) {

@@ -141,3 +141,3 @@ return DEFAULT_SOURCETREE;

}
if (defaultPath) {

@@ -162,3 +162,3 @@ return path.join(defaultPath, path.basename(filePath));

var opt = opt || {};
self = this;

@@ -173,9 +173,8 @@

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

@@ -202,4 +201,12 @@ if (opt.explicitFileType) {

}
if (opt.sign) {
if (!this.settings)
this.settings = {};
if (!this.settings.ATTRIBUTES)
this.settings.ATTRIBUTES = [];
this.settings.ATTRIBUTES.push('CodeSignOnCopy');
}
}
module.exports = pbxFile;

@@ -273,9 +273,20 @@ var util = require('util'),

var customFramework = opt && opt.customFramework == true;
var link = !opt || (opt.link == undefined || opt.link); //defaults to true if not specified
var embed = opt && opt.embed; //defaults to false if not specified
this.addToPbxBuildFileSection(file); // PBXBuildFile
this.addToPbxFileReferenceSection(file); // PBXFileReference
this.addToFrameworksPbxGroup(file); // PBXGroup
this.addToPbxFrameworksBuildPhase(file); // PBXFrameworksBuildPhase
if (opt && opt.customFramework == true) {
if (link) {
this.addToPbxFrameworksBuildPhase(file); // PBXFrameworksBuildPhase
}
if (customFramework) {
this.addToFrameworkSearchPaths(file);
if (embed) {
this.addToPbxEmbedFrameworksBuildPhase(file); // PBXCopyFilesBuildPhase
}
}

@@ -290,9 +301,10 @@

this.removeFromPbxBuildFileSection(file); // PBXBuildFile
this.removeFromPbxFileReferenceSection(file); // PBXFileReference
this.removeFromFrameworksPbxGroup(file); // PBXGroup
this.removeFromPbxFrameworksBuildPhase(file); // PBXFrameworksBuildPhase
this.removeFromPbxBuildFileSection(file); // PBXBuildFile
this.removeFromPbxFileReferenceSection(file); // PBXFileReference
this.removeFromFrameworksPbxGroup(file); // PBXGroup
this.removeFromPbxFrameworksBuildPhase(file); // PBXFrameworksBuildPhase
this.removeFromPbxEmbedFrameworksBuildPhase(file); // PBXCopyFilesBuildPhase
if (opt && opt.customFramework) {
this.removeFromFrameworkSearchPaths(path.dirname(fpath));
this.removeFromFrameworkSearchPaths(file.dirname);
}

@@ -583,3 +595,21 @@

pbxProject.prototype.addToPbxEmbedFrameworksBuildPhase = function (file) {
var sources = this.pbxEmbedFrameworksBuildPhaseObj(file.target);
if (sources) {
sources.files.push(pbxBuildPhaseObj(file));
}
}
pbxProject.prototype.removeFromPbxEmbedFrameworksBuildPhase = function (file) {
var sources = this.pbxEmbedFrameworksBuildPhaseObj(file.target);
if (sources) {
for (i in sources.files) {
if (sources.files[i].comment == longComment(file)) {
sources.files.splice(i, 1);
break;
}
}
}
}
pbxProject.prototype.addToProductsPbxGroup = function(file) {

@@ -911,2 +941,6 @@ var productsGroup = this.pbxGroupByName('Products');

pbxProject.prototype.pbxEmbedFrameworksBuildPhaseObj = function (target) {
return this.buildPhaseObject('PBXCopyFilesBuildPhase', 'Embed Frameworks', target);
};
// Find Build Phase from group/target

@@ -1173,10 +1207,10 @@ pbxProject.prototype.buildPhase = function(group, target) {

config, buildSettings;
for (config in configurations) {
buildSettings = configurations[config].buildSettings;
if (unquote(buildSettings['PRODUCT_NAME']) != this.productName) {
continue;
}
if (buildSettings[OTHER_LDFLAGS]) {

@@ -1200,3 +1234,3 @@ var matches = buildSettings[OTHER_LDFLAGS].filter(function (p) {

buildSettings = configurations[config].buildSettings;
buildSettings[buildSetting] = value;

@@ -1212,3 +1246,3 @@ }

buildSettings = configurations[config].buildSettings;
if (buildSettings[buildSetting]) {

@@ -1255,7 +1289,7 @@ delete buildSettings[buildSetting];

targetName = name.trim();
// Check type against list of allowed target types
if (!targetName) {
throw new Error("Target name missing.");
}
}

@@ -1265,3 +1299,3 @@ // Check type against list of allowed target types

throw new Error("Target type missing.");
}
}

@@ -1272,3 +1306,3 @@ // Check type against list of allowed target types

}
// Build Configuration: Create

@@ -1275,0 +1309,0 @@ var buildConfigurationsList = [

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

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

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

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