Skip to content

Instantly share code, notes, and snippets.

View jmatthiesen's full-sized avatar

Jordan Matthiesen jmatthiesen

View GitHub Profile
@jmatthiesen
jmatthiesen / cordova-ios-disable-push.js
Last active August 21, 2017 08:20 — forked from Delagen/cordova-ios-disable-push.js
A hook to automate setting the DISABLE_PUSH_NOTIFICATIONS preprocessor definition when building on iOS. This helps prevent warnings from App Store submission about using push notifications, if you don't intend to use them.
"use strict";
/*use in config.xml <hook type="after_platform_add" src="../path/to/cordova-ios-disable-push.js"/>*/
var fs = require("fs");
var path = require("path");
var COMMENT_KEY = /_comment$/;
function nonComments(obj) {
var newObj = {};
Object.keys(obj).forEach(function(key) {
if (!COMMENT_KEY.test(key)) {