如果用户已禁用应用推送功能,是否可以进行“无声远程通知"? [英] Is Silent Remote Notifications possible if user has disabled push for the app?

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

问题描述

在我的设置"标签栏中:

In my settings tabbar:

  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.

尽管...

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

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

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

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