Commit ba598c3d authored by Simon MacDonald's avatar Simon MacDonald
Browse files

Issue #24: Event not fired when in background

On iOS 7 the badge was not appearing.
parent dd503ebd
Loading
Loading
Loading
Loading
+4 −2
Changes for src/ios/PushPlugin.m: 4 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -100,10 +100,12 @@
        [[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