I'm registering my app for receiving push notifications from APNS in application:didFinishLaunchingWithOptions: method this way:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
The registration is ok and my provider succesfully gets my token, in fact I do receive push notifications, but when my app is not in foreground a banner is displayed. I expected an alert to be shown, with 'Close' and 'View' buttons, and I receive the "alert" string in the payload dictionary... what could be happening?
Check the phone settings, users can customize how they want Push Notifications to appear on their devices.

You can not change this setting using code (Reference: https://stackoverflow.com/a/9137501/)
However, you may check the current setting and then request the user to change it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With