我可以使用 iOS 推送通知进行应用实时内容更新吗? [英] Can I use iOS push notifications for app realtime content update?

查看:94
本文介绍了我可以使用 iOS 推送通知进行应用实时内容更新吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用没有徽章、消息或声音的推送通知消息,仅使用与应用程序相关的 JSON,以便实时更新应用程序的内容.这些通知在应用程序未运行时无用,因此我不会在应用程序进入后台或用户空闲时发送它们(向我的服务器发送取消订阅),并在应用程序进入前台或用户活动时再次订阅.Apple 是否允许这种推送通知的使用?我不想使用轮询或基于自定义套接字的解决方案.

I would like to use push notification message without badge, message or sound, only with application related JSON in order to update app's content in realtime. These notifications useless when app is not running so I won't send them when app enters background or user idle (sending unsubsrcibe to my server ) and subscribe again when app enters foreground or user activity. Does Apple permit this usage of push notification? I wouldn't like to use polling or custom socket based solution.

推荐答案

我不确定推送通知是否适合您.

I am not sure push notification is the way to go for you.

你应该非常小心地使用推送,如果没有充分的理由,人们不喜欢收到通知.(有些人沉迷于让通知中心远离通知,这是一种 ocd ..).

you should use pushes very carefully, people don't like to receive notifications if there is not a good reason for that. (some people are addicted to leave the notification center clear of notifications, it's kind of an ocd..).

现在,我不确定您想在什么时候发送通知,但如果它是出于更新目的而您会在应用程序未运行时将其关闭,为什么不在启动后每隔一段时间更新一次该应用程序使用一个简单的休息服务器.如果您不想提醒用户(没有声音、消息或徽章),那么推送有什么意义..

Now, I'm not sure when exactly you want to send the notifications, but if it is for update purposes and you would turn it off when the app is not running, why not just update every once in a while after starting the app using a simple rest server. if you don't want to alert the user (no sound, message, nor badge) then what's the point in pushing..

这篇关于我可以使用 iOS 推送通知进行应用实时内容更新吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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