Cordova how to remove "Push notification" on iOS

Trong Lam Phan picture Trong Lam Phan · Jul 29, 2014 · Viewed 8.6k times · Source

I submitted my application using Apache Cordova to Apple Store and I got a warning from apple that "Missing Push Notification Entitlement".

But it seems that I've never used "Push Notification" in my application. How can I remove it from my application? Is it default in Apache Cordova?

Answer

Steven de Salas picture Steven de Salas · Aug 4, 2015

HOW TO DO THIS FOR CORDOVA APPS 'PROPERLY':

I also had this problem. The solution proposed by @michaelb worked but I was frustrated enough seeing that the whole thing was wrapped in conditional compilation (ie #ifndef DISABLE_PUSH_NOTIFICATIONS) that I decided to learn how to add a 'Preprocessor Macro', which basically tells XCode to compile you app with this bit of code left out.

This is how the you can define the DISABLE_PUSH_NOTIFICATIONS precompilation symbol graphically via the UI (note that this the way its done in XCode 6.1):

enter image description here

Hope this helps other people out there in same situation.