It appears the function application:didReceiveRemoteNotification:fetchCompletionHandler
is not called when the app has been forcefully quit. It was my impressio
If you force quit an app from the application switcher, it will not be woken in the background (via any means) until after the next time it is next launched. When you force quit an app, you are effectively saying to the OS that you do not want this app to run at all, even if a background event would normally have woken it.
This is worth watching out for during testing, as you may have force quit the app in order to check that it gets launched via the push notification when the app is not running. In fact, your use of force quit will be the reason why it doesn't get launched.
As documented by Apple, the new multitasking API (fetch and remote-notification) will work only when the app in the suspended/background/foreground state.
In the background/foreground state, then application:didReceiveRemoteNotification:fetchCompletionHandler
will get triggered.
In the Suspended state, then -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
will get triggered.
In the Not Running state (your case), application:didReceiveRemoteNotification:fetchCompletionHandler
never gets triggered.
Please refer to the Apple documentation for more about app states.