Cordoba, how to remove "Push Notification" on iOS

I sent my application using Apache Cordova to the Apple Store, and I got a warning from Apple that “No Push Push Notification Permission”.

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

+12
ios push-notification cordova feedback
Jul 29 '14 at 14:32
source share
5 answers

HOW TO DO IT FOR CORD APPLICATIONS:

I also had this problem. The solution suggested by @michaelb worked, but I was pretty upset to see that it was all wrapped in conditional compilation (i.e. #ifndef DISABLE_PUSH_NOTIFICATIONS ), which I decided to learn to add a "Macroprocessor Macro", which basically tells Xcode for compiling your application with this lack of code.

Thus, you can define the precompilation symbol DISABLE_PUSH_NOTIFICATIONS graphically through the user interface (note that this is done in Xcode 6.1):

enter image description here

Hope this helps other people in the same situation.

+17
Aug 04 '15 at 3:03 on
source share

In AppDelegate.m, remove didRegisterForRemoteNotificationsWithDeviceToken and didFailToRegisterForRemoteNotificationsWithError. Work with Phonegap 3.5

+5
Nov 19 '14 at 8:43
source share

Following the recommendations above and elsewhere, this is what I did in Cordova 5.0.0

As a result, the warning disappeared, and I did not notice any problems with the application.

  • Open Platforms / ios / InfoganGardenAdmin / Classes / AppDelegate.m
  • Line output from 116 to 137

Example:

 /* - Removed to disable push notification and Apple warning message #ifndef DISABLE_PUSH_NOTIFICATIONS - (void) application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken { // re-post ( broadcast ) NSString* token = [[[[deviceToken description] stringByReplacingOccurrencesOfString:@"<" withString:@""] stringByReplacingOccurrencesOfString:@">" withString:@""] stringByReplacingOccurrencesOfString:@" " withString:@""]; [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotification object:token]; } - (void) application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error { // re-post ( broadcast ) [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotificationError object:error]; } #endif */ 
+5
Jun 02 '15 at 12:17
source share

Most likely, the problem is with the version you are using, PhoneGap 3.5 has the same problem (PhoneGap is built on Cordoba), you can view the discussion topic here

The current solution seems to be "using an older version"

+2
Oct 08 '14 at 2:03
source share

The letter is rather vague and can be used in several ways, and if you are a new developer, you probably did not know about the wait time for Apple Store app reviews. See AppReviewTimes .

To clarify: this is just a warning, and you can ignore it if you are not using push notifications.

Do not try to fix something that has not broken. Plus, all the solutions that I could find did not work.

-one
Sep 16 '15 at 15:48
source share



All Articles