ios - 如果用户禁用了应用程序的推送,是否可以进行静默远程通知?

标签 ios objective-c push-notification notifications silent-notification

在我的设置标签栏中:

  1. 我有一个特定于功能的开关,可以根据 API 响应打开或关闭。
  2. 只有管理员有权打开/关闭网站。
  3. 我可以每次在设置点击时调用/user API 以检查用户的当前设置,但有几个缺点,例如如果用户已经在设置中,那么它不会更新 UI 并且每次在设置点击时调用 api 不会这听起来不是一个完美的解决方案。

我认为更好的解决方案是发送静默推送通知,我可以使用它来调用 API 以在需要时更新设置 UI。

但是如果用户禁用了推送通知,我还会收到静默推送吗?处理这种情况的推荐方法是什么?

最佳答案

简短回答,是的

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.

虽然……

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.

在构建应用程序时请记住这一点。

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

关于ios - 如果用户禁用了应用程序的推送,是否可以进行静默远程通知?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30644343/

相关文章:

ios - objective-c - 存储到的对象的潜在泄漏

ios - 单击应用程序图标时推送通知应用程序内角标(Badge)图标未更新

ios - 确认 iPhone 用户

ios - Swift 中具有动态高度的 UITableView

ios - 如何将 UILocalNotification 设置为每月或每周按计划的同一时间运行?

objective-c - iOS 应用程序上的 WYSIWYG 文本编辑器小部件

ios - 是否可以为 SKStoreProductViewController loadProductWithParameters 设置超时?

ios - subview 的约束在 iOS 8、XCode 6 (6A313) 中不起作用。适用于 iOS 7

android - ios和android推送通知到多个设备

使用 Firebase 的 iOS 推送通知