我可以在 iOS 7 中使用 Apple 推送通知服务让我的应用程序在不通知用户的情况下执行某些操作吗 [英] Can I use Apple Push Notification Service to have my app do something without notifying user in iOS 7

查看:17
本文介绍了我可以在 iOS 7 中使用 Apple 推送通知服务让我的应用程序在不通知用户的情况下执行某些操作吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的算法希望以这种方式工作-

My Algorithm wishes to work this way-

如果我的服务器上发生了一些想要的事件,那么我希望向我的应用程序的每个用户(前台或后台)发送少量数据.但是,我希望我的应用程序对数据进行一些计算并确认服务器,而不是通知用户.请记住,不得通知用户.

If some desired event occurs at my server then I wish to send a small amount of data to every user my app (foreground or background). But, instead of notifying the user I wish my app to do some computation on data and acknowledge server. Remember user must not be notified.

推荐答案

您可以使用推送通知数据中的 content-available 键和 application:didReceiveRemoteNotification:fetchCompletionHandler:.对于您的用例来说,它可能被认为是一种黑客行为,如果您尝试过多地使用它,您将受到 Apples 系统的限制.

You can use the content-available key in the push notification data and application:didReceiveRemoteNotification:fetchCompletionHandler:. It could be considered a bit of a hack for your use case and if you try to use it too much you will get limited by Apples system.

这篇关于我可以在 iOS 7 中使用 Apple 推送通知服务让我的应用程序在不通知用户的情况下执行某些操作吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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