silent-notification

Silent push notifications only delivered if device is charging and/or app is foreground

ぐ巨炮叔叔 提交于 2019-11-27 10:21:25
I have implemented silent push notifications but I have noticed some strange behaviour. The silent push notifications are handled via: - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler The silent push messages only seem to be received if the device is charging (ie cable connected) and/or if my app is foreground. If I disconnect the device from the charger (or Mac) then the silent push notifications are no longer received unless the app is foreground. I get non-silent

What is difference between remote notification and silent notification in iOS?

痞子三分冷 提交于 2019-11-25 23:46:22
问题 When I read Apple Docs, they mention 3 types of notification: local, remote, and silent. Local notification can be inferred from its name, that is sent by the app locally. However, what is the difference of the other two types? 回答1: EDIT: While this answer is fully applicable, there are some additions (not changes) to notifications in iOS 12. I highly recommend watching WWDC 2018: What’s New in User Notifications and see here. Main changes are: group notifications provisional notifications