Is Silent Remote Notifications possible if user has disabled push for the app?
Asked Answered
M

3

52

In my settings tabbar:

  1. I have a feature specific switch which can be turned OFF or ON based on API response.
  2. From website only admin is authorized to turn ON/OFF.
  3. I can make /user API call everytime on settings tap to check the current settings for the user but there are couple of disadvantage like if user is already on setting then it will not update the UI and calling api everytime on settings tap doesn't sounds a perfect solution.

I think better solution is to send a silent push notification which i can use to make the API call to update the settings UI whenever needed.

But if user has disabled the push notification will I still receive silent push ? What is the recommended approach to handle such situations ?

Marozik answered 4/6, 2015 at 12:50 Comment(0)
A
70

Short answer, yes

The exciting new opportunity for app developers in iOS 8 is that Apple will now deliver “silent” pushes even if the user has opted out of notifications. Also, “silent push” is no longer just for Newsstand apps. Every app can take advantage of this ability to refresh content in the background, creating the most up-to-date, responsive experience possible, the moment the user opens the app.

Although...

Users still have the ability to switch off your app’s ability to process a “silent push” by means of the “Background App Refresh” control. Even though Apple Push Notification service (APNs) will deliver a push marked “content-available” to your phone, the OS will not wake up your app to receive it, effectively dropping it on the floor. However, opting out of “Background App Refresh” is a lesser-known capability not directly associated with Notifications. You don’t access this preference in your Notifications Settings--it’s located under General > Background App Refresh screen.

Keep this in mind when building your application.

Source: https://www.urbanairship.com/blog/watch-list-ios-8-opt-in-changes

Arroba answered 6/7, 2015 at 4:40 Comment(5)
Are you sure it's still true for iOS9?Illusage
It is true for iOS8 and later.Tallow
Link is dead... maybe this is the one? urbanairship.com/blog/watch-list-ios-8-opt-in-changesAlfred
Keep in mind that if the App has some kind of VoIP functionality it can use the VoIP facility to push silent notifications and launch itself even if "Background App Refresh" is disabled. Sad, iOS is becoming Android. More here: #19069262Tallou
But VoIP push seems immune for both opts though, there is no way that a user can stop VoIP push...Earmark
T
41

This matrix might help. At left hand side, it shows if didReceiveRemoteNotification: method will get called or not. Other two columns is related to setting app: Settings -> YourApp. If your app supports Notifications and background app refresh. Look into matrix to check when you app will receive silent push.

Tallow answered 7/9, 2016 at 15:15 Comment(4)
Does "low power mode" impact delivery?Norway
I'm not sure, but I think if disable ALL ie your last row. You would still get a silent notification if your app is in foreground.Mucosa
I don't still get a notification if my app is in the foreground if both notifications and background app refresh are disabled by the user.Merited
Me neither (iOS 15)Pileous
M
9

Other answers are good. But they are not official answers.

The official answer is in What's New in Notifications WWDC 2015 video:

Silent notifications are enabled by default. The user does not need to approve your -- does not give permission to your app to use them, and you can just start using them without asking the user for permission. But silent notifications are the mechanism behind background app refresh. At any point you know that the user can go in settings and disable them. So you can't depend on them always being available. You don't know if the user the turn them off, and you are not getting a notification anymore. This also means that silent notifications are delivered with the best effort. That means that when the notification arrives on the user's device, the system is going to make some choices.

enter image description here

For more see this answer

Mucosa answered 23/2, 2018 at 19:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.