是否有可能发送"沉默的QUOT;推iPhone的通知(没有任何警报的用户)? [英] Is it possible to send a "silent" push notification on iPhone (without any alert to the user)?

查看:116
本文介绍了是否有可能发送"沉默的QUOT;推iPhone的通知(没有任何警报的用户)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要做一个聊天应用程序的通知客户端有新的数据从服务器获取。

I need to do it on a chat app to notice the client that there is new data to fetch from the server.

我知道,在技术上有可能用一个空的有效载荷(至少在iOS 5的设备,它的工作),但苹果把它看作服务的滥用或者是确定呢?

I know that technically it is possible with an empty payload (at least on ios 5 device it worked), but can Apple see it as abuse of service or is it OK to do it?

和它是技术上可能在iOS 4设备?

And is it technically possible on ios 4 device?

推荐答案

是的,只增加证件号码,不发出声和警报,因此,将有上的应用图标一个Badge上。

Yes, increment only badge number, dont send sound and alert, So, there will be one badge on the App icon.

所以,在这里不知不觉徽章数量将增加表明,当用户观看应用程序图标的东西已经收到。

So, here unknowingly the badge number will be incremented to show that something has been recieved when user watches the app icon.

但是,你的设备将无法recive警报或空的有效载荷,并不会收到声音也因为你要求在iPhone上的沉默推送通知

But your device won't recive alert or empty payload and won't recieve sound also because you asked for "silent" push notification on iPhone

和配置在AppDelegate中,同时,仅配置徽章

and while configuring in AppDelegate, configure only badges

 [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge];

希望这将是对你有所帮助。

Hope this will be helpful for you

这篇关于是否有可能发送"沉默的QUOT;推iPhone的通知(没有任何警报的用户)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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