Hi,
I am trying to process Remote Notifications (content-available = 1) on my iOS application. I have enabled both Push Notifications and Background Modes (Remote Notifications) in my XCode project. This is what I observe:
1) If my application had been launched since the previous reboot and has not been swiped up:
The application:didReceiveRemoteNotification:fetchCompletionHandler: gets called when the notification arrives - as expected.
2) If my application had not been launched explicitly since the previous reboot:
The application:didReceiveRemoteNotification:fetchCompletionHandler: function does not get called. However, Apple documentation seems to indicate that my application should be launched when a notification does come in.
To quote the documentation:
"...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..."
One important thign to note is that the system alert is displayed when the remote notification arrives in both cases. The problem in case 2 is only with the code not getting executed.
Has anyone ever experienced this problem? Is what I am seeing the expected behavior?