如果用户禁用了应用程序的推送,是否可以进行静默远程通知? [英] Is Silent Remote Notifications possible if user has disabled push for the app?

查看:16
本文介绍了如果用户禁用了应用程序的推送,是否可以进行静默远程通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的设置标签栏中:

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

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

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 ?

推荐答案

简短的回答,

对于 iOS 8 中的应用程序开发人员来说,令人兴奋的新机会是,即使用户选择退出通知,Apple 现在也将提供静默"推送.此外,静默推送"不再仅适用于报亭应用.每个应用都可以利用这种功能在后台刷新内容,从而在用户打开应用的那一刻创造尽可能最新的响应式体验.

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.

虽然...

用户仍然可以通过后台应用刷新"控件关闭您的应用处理静默推送"的功能.即使 Apple 推送通知服务 (APNs) 会向您的手机发送标记为内容可用"的推送,操作系统也不会唤醒您的应用程序来接收它,从而有效地将其丢在地板上.但是,选择退出后台应用程序刷新"是一种鲜为人知的功能,与通知没有直接关联.您无法在通知设置"中访问此首选项——它位于常规">后台应用程序刷新"屏幕下.

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.

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

这篇关于如果用户禁用了应用程序的推送,是否可以进行静默远程通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆