What is the solution for push notification delegate to fire when app is in not running state?
How can we make fire the push notification delegates if app is not running state without tapping the received notification.
1. Received notification
2.Not tapping on notifications
3.Launching the app by clicking app icon
In this state how can i check if push notification received or not?
If iOS system detects pushNotification with "content-available" key having value 1, it will call application:didReceiveRemoteNotification:fetchCompletionHandler: of your appDelegate.
Apple - Discussion
Use this method to process incoming remote
notifications for your app. Unlike the
application:didReceiveRemoteNotification: method, which is called only
when your app is running in the foreground, the system calls this
method when your app is running in the foreground or background. In
addition, if you enabled the remote notifications background mode, the
system launches your app (or wakes it from the suspended state) and
puts it in the background state when a remote notification arrives.
However, the system does not automatically launch your app if the userhas force-quit it. In that situation, the user must relaunch your appor restart the device before the system attempts to launch your appautomatically again.
You need to enable background modes.
Asked in February 2016Viewed 3,254 timesVoted 12Answered 2 times