[英]getting silent push notification
我試圖在應用程序完全關閉時收到靜默的推送通知,但是我沒有得到推送,我還缺少什么?
我添加了以下內容:必需的后台模式->應用程序下載內容以響應推送通知
我在AppDelagate
實現:
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) { completionHandler(UIBackgroundFetchResult.NewData); JLToast.makeText("background").show()}
我發送一個推送:
aps {內容可用:1}
當應用程序在后台運行時,我會收到無提示推送通知,但是當應用程序在后台運行時(完全被擊落),我不會得到推送。
什么東西少了?
據我所知,如果應用程序被用戶強制退出,則靜默推送通知將不起作用。 考慮2種情況:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.