Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Commit

Permalink
Issue #24: Event not fired when in background
Browse files Browse the repository at this point in the history
On iOS 7 the badge was not appearing.
  • Loading branch information
macdonst committed Jul 7, 2015
1 parent dd503eb commit ba598c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ios/PushPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,12 @@ - (void)init:(CDVInvokedUrlCommand*)command;
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
[[UIApplication sharedApplication] registerForRemoteNotifications];
} else {
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:notificationTypes];
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
}
#else
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:notificationTypes];
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
#endif

if (notificationMessage) // if there is a pending startup notification
Expand Down

0 comments on commit ba598c3

Please sign in to comment.