且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

仅当应用程序在后台时才调用静默通知回调方法

更新时间:2022-12-27 11:00:34

经过大量的苹果文档阅读,我发现如果用户强制退出应用程序,方法 (didReceiveRemoteNotification: fetchCompletionHandler) 将不会调用.

After lot of apple docs reading, I found that the method (didReceiveRemoteNotification: fetchCompletionHandler) will not invoke if user has force-quit the app.

如所写,(link)但是,如果用户强制退出,系统不会自动启动您的应用程序.在这种情况下,用户必须重新启动您的应用或重新启动设备,然后系统才会再次尝试自动启动您的应用.

As written, (link) 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.