summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/cordova/lib/projectFile.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-10-26 01:41:16 +0200
committerJules Laplace <julescarbon@gmail.com>2017-10-26 01:41:16 +0200
commit8dae6a5044f9c1b7a8497cc1c96155fd262b40cf (patch)
tree6f546503efcb198a193f919efafb83977abb9535 /StoneIsland/platforms/ios/cordova/lib/projectFile.js
parent531c60ee7ecbee516812d560b63a8317c3cf3590 (diff)
iphone x fixes
Diffstat (limited to 'StoneIsland/platforms/ios/cordova/lib/projectFile.js')
-rwxr-xr-xStoneIsland/platforms/ios/cordova/lib/projectFile.js24
1 files changed, 11 insertions, 13 deletions
diff --git a/StoneIsland/platforms/ios/cordova/lib/projectFile.js b/StoneIsland/platforms/ios/cordova/lib/projectFile.js
index aab38639..8a3f7e51 100755
--- a/StoneIsland/platforms/ios/cordova/lib/projectFile.js
+++ b/StoneIsland/platforms/ios/cordova/lib/projectFile.js
@@ -17,8 +17,6 @@
under the License.
*/
-/*jshint node: true*/
-
var xcode = require('xcode');
var plist = require('plist');
var _ = require('underscore');
@@ -31,7 +29,7 @@ var CordovaError = require('cordova-common').CordovaError;
var cachedProjectFiles = {};
-function parseProjectFile(locations) {
+function parseProjectFile (locations) {
var project_dir = locations.root;
var pbxPath = locations.pbxproj;
@@ -62,24 +60,24 @@ function parseProjectFile(locations) {
var resourcesDir = path.resolve(xcode_dir, 'Resources');
cachedProjectFiles[project_dir] = {
- plugins_dir:pluginsDir,
- resources_dir:resourcesDir,
- xcode:xcodeproj,
- xcode_path:xcode_dir,
+ plugins_dir: pluginsDir,
+ resources_dir: resourcesDir,
+ xcode: xcodeproj,
+ xcode_path: xcode_dir,
pbx: pbxPath,
projectDir: project_dir,
platformWww: path.join(project_dir, 'platform_www'),
www: path.join(project_dir, 'www'),
write: function () {
fs.writeFileSync(pbxPath, xcodeproj.writeSync());
- if (Object.keys(this.frameworks).length === 0){
+ if (Object.keys(this.frameworks).length === 0) {
// If there is no framework references remain in the project, just remove this file
shell.rm('-rf', frameworks_file);
return;
}
fs.writeFileSync(frameworks_file, JSON.stringify(this.frameworks, null, 4));
},
- getPackageName: function() {
+ getPackageName: function () {
return plist.parse(fs.readFileSync(plist_file, 'utf8')).CFBundleIdentifier;
},
getInstaller: function (name) {
@@ -93,7 +91,7 @@ function parseProjectFile(locations) {
return cachedProjectFiles[project_dir];
}
-function purgeProjectFileCache(project_dir) {
+function purgeProjectFileCache (project_dir) {
delete cachedProjectFiles[project_dir];
}
@@ -115,7 +113,7 @@ xcode.project.prototype.addToPbxEmbedFrameworksBuildPhase = function (file) {
xcode.project.prototype.removeFromPbxEmbedFrameworksBuildPhase = function (file) {
var sources = this.pbxEmbedFrameworksBuildPhaseObj(file.target);
if (sources) {
- sources.files = _.reject(sources.files, function(file){
+ sources.files = _.reject(sources.files, function (file) {
return file.comment === longComment(file);
});
}
@@ -124,13 +122,13 @@ xcode.project.prototype.removeFromPbxEmbedFrameworksBuildPhase = function (file)
// special handlers to add frameworks to the 'Embed Frameworks' build phase, needed for custom frameworks
// see CB-9517. should probably be moved to node-xcode.
var util = require('util');
-function pbxBuildPhaseObj(file) {
+function pbxBuildPhaseObj (file) {
var obj = Object.create(null);
obj.value = file.uuid;
obj.comment = longComment(file);
return obj;
}
-function longComment(file) {
+function longComment (file) {
return util.format('%s in %s', file.basename, file.group);
}