- 蘋果文檔
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 user has force-quit it. In that situation, the user must relaunch your app or restart the device before the system attempts to launch your app automatically again.
當(dāng)通知來了
- - application:didReceiveRemoteNotification:fetchCompletionHandler:
- 應(yīng)用程序在前臺或后臺運行時都會調(diào)起該方法
- 當(dāng)該方法使用后,- application:didReceiveRemoteNotification: 會失效
- - application:didReceiveRemoteNotification:
- 應(yīng)用程序在前臺運行時會調(diào)起該方法