Skip to content

Instantly share code, notes, and snippets.

@marekkalnik
Last active October 11, 2015 16:31
Show Gist options
  • Save marekkalnik/a43df110e74d5a81cf85 to your computer and use it in GitHub Desktop.
Save marekkalnik/a43df110e74d5a81cf85 to your computer and use it in GitHub Desktop.
#!/usr/bin/env node
var fs = require('fs');
var configFile = './platforms/ios/cordova/build.xcconfig';
var disableBitcode = function() {
fs.appendFile(configFile, "\n" + 'ENABLE_BITCODE = NO', function(err) {
if (err) {
console.log(err);
return process.exit(1);
}
console.log('Bitcode disabled');
process.exit(0);
});
};
fs.readFile(configFile, 'utf8', function(err, data) {
if (/ENABLE_BITCODE = NO/.test(data)) {
console.log('Bitcode already disabled');
return process.exit(0);
}
return disableBitcode();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment