Push notification in iOS app when "Not running" state - ios

I working with GCM Push notifications in my iOS app. The problem is, when user killed this app by the switch up in task manager. If the user do this then notifications wasn't display on screen. How can I fix this? I know about PushKit framework but I interested for example how gmail do this in iOS 6 or 7?

Solution for the problem is to set the "priority" to "high" in push notification json.

Related

Notification not received in foreground in release ipa

I have integrated firebase for push notifications in flutter. If the app is in foreground I have displayed a dialog with notification details. I am receiving notifications properly in android. Also when I run the ios application from XCode notifications are working fine. However in release ipa notifications are not received in foreground but working well in app background state. I have enabled push notifications and background fetch as well. Any solution for this? Has anybody faced such issue?
Push notifications not showing notifications strip in foreground mode.
Please check in the delegate method that you are receiving or not.
Please follow this link
May be it will help you
https://medium.com/#viveky259259/flutter-firebase-notifications-7954a3ad8111

iOS Push Notification Programming - Is there a way to disable push notification on iPhone by programming

A few days ago, I got the issue below.
I've been getting notifications for the past several days. The notification had been enabled, and the app was working (I received push notification) until it suddenly didn't yesterday. And when I open the app, it suddenly asks me to enable notification (please see the picture "iOS Push Notification Permission Alert.png")
iOS Push Notification Permission Alert.png
I guessed that my client removed the app and re-installed, so all permissions were lost. But they said that they didn't.
So, How can it happen?
My concerns are:
If notification was enabled, how can it show the alert above again? Is there a possible way?
If notification was not enabled, why have I received the notification for the past several days?
Under which scenario(s), would an app suddenly disable already enabled notification? Is there a way to disable notification permission for the app on the iOS phone by programming?
I will appreciate your answers so much!
P/s: I read the post disable push notification in app, but it doesn't help for my questions.
This is only possible if the app is reinstalled or the notifications are turned off from the settings.
There is one setting in iPhone which will allow iPhone to offload the unused apps and if this happened, there will be a cloud icon on the left of app title.The app will be reinstalled when you click it again.
And it seems that it will also happened when the storage of iPhone is not enough.
So I guess this happened in your client's phone.
This setting is in both Setting-iTunes & App Stores-Offload Unused Apps and Setting-General-iPhone Storage-Offload Unused Apps.

iOS 10.3 to iOS 11 upgrade : User stop receiving silent push notifications

I have many users complaining that when they migrated from iOS 10.3.3 to iOS 11 launched yesterday, they stopped receiving silent push notifications.
One thing is to be noted that, I have a setting in NSUSerDefaults if I have already asked the user for registering for push notifications. And I do :
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
Only if the user hasn't been asked before.
Now if user had already registered for notifications when he was on iOS 10.3.3, and upgrades to iOS 11, the code registerUserNotificationSettings:settings will never be called for him, until he reinstalls. Could that be an issue? However, I believe it is unnecessary for him to register again as he already is.
So how do I fix this?
From documentation:
It is recommended that you call this method before you schedule any
local notifications or register with the push notification service.
So it is advised to call it at least once per app launch, but before your server sends the push notification.

iOS 10 push notification authorization request showing up on app launch

Previously, when building my app using the iOS 9 SDK, the push notification authorization request alert (that system alert which says: "App" Would Like to Send You Notifications ... Don't Allow / Allow) would only show when I called [[UIApplication sharedApplication] registerForRemoteNotifications].
We've decided to actually only do that at a certain point in the game, so the user is only encouraged to allow push notifications when it makes sense.
On iOS 10, I understand we must use the User Notifications framework to accomplish that (by calling requestAuthorizationWithOptions:completionHandler: on [UNUserNotificationCenter currentNotificationCenter]), enable Push Notification on the app Capabilities and setup the entitlements. And that does work on some devices, but not all of them.
On some devices, the authorization request is presented to the user right at app launch even though I did not call requestAuthorizationWithOptions:completionHandler: or registerForRemoteNotifications at any point yet.
The weirdest part is that this happens consistently on some devices (running iOS 10.1.1 or 10.2 beta), even if I install the AppStore version of the app (which was built using Xcode 7 and iOS 9 SDK).
Should I assume this is a bug of iOS 10? I couldn't find other people with the same issue, only a kinda similar issue here.
The issue is actually a change from iOS 9 to iOS 10 on Game Center's [GKLocalPlayer localPlayer].authenticateHandler.
When it is set, it will trigger a push notification permission request on iOS 10. This did not happen on iOS 9.
For anyone stumbling upon this and not finding the above answer to have been the cause of their problem, it should be noted that attempting to change the app badge will also result in a Push Notification request.
My personal situation was regarding a Cordova app, where I was loading and applying the badge plugin before initialising push, and couldn't work out why the Notification permission dialog was appearing on app launch.

How iOS Notifications Work, if App notification setting is set OFF then ON?

Is it possible to see old notifications in my iOS device, if I set the app notification settings from OFF state to ON state?
Say for instance, I have set my App notification settings as "OFF" yesterday where the APP admin has sent custom notification message. Today I noticed that the App Settings are in OFF state. So I changed the settings to ON. Will I get that custom notification now?
No it's not possible,Once you de-authorise any app to send Push Notifications then your device isn't able to receive the notification from that particular app,So you can't find the old notifications.

Resources