应用程序关闭时,报亭应用程序下载 [英] Newsstand App download when app is closed

查看:126
本文介绍了应用程序关闭时,报亭应用程序下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实施一个报摊杂志应用程序,通过Urban Airship推送通知接收新问题。
这个工作正常,只要应用程序在前台或后台,但据我所知,应用程序完全关闭时也应该触发下载。但是,如果我的应用程序已关闭,则在有效负载中发送带有content-available:1 的推送不会执行任何操作。

I am implementing a newsstand magazine app, which receives new issues via Urban Airship push notifications. This works fine, as long as the app is in foreground or background, but as far as I know, the download should also be triggered when the app is completely closed. But sending a push with "content-available":1 in the payload does not do anything if my app is closed.

我在目标属性中设置了所需的背景模式,并使用 NKDontThrottleNewsstandContentNotifications 来避免测试问题。

I set the required background mode in the targets properties and I use NKDontThrottleNewsstandContentNotifications to avoid problems with testing.

我错过了什么吗?

不应该推动我的

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

UIApplicationLaunchOptionsRemoteNotificationKey 调用?

非常感谢!

推荐答案

根据这篇文章

开发报亭应用程序的开发人员可以提供新的加强推送通知,通知他们的应用程序(而不是比推送通知通常做的用户,可以下载新的问题。当报亭应用收到此类通知时,如果设备在WiFi上,则可以在后台下载。这里的主要限制是每个应用程序每天只能发送其中一个推送通知,因此目前开发人员无法开发同时提供早间版和晚间版的报纸 - 尽管我怀疑这最终可能会发生变化。

developers that are developing Newsstand apps can deliver a new "souped-up" push notification that informs their app (rather than the user as push notifications normally do), that a new issue is ready to be downloaded. When a Newsstand app receives such a notification, it can download in the background if the device is on WiFi. The main limitation here is that each app can only send 1 of these push notifications per day, so at the moment developers cannot develop newspapers that deliver both a morning edition and evening edition – although I suspect this might change eventually.

因此只有在设备处于Wifi状态时才能下载。

So it can download only if the device is on Wifi.

这些是其他类似问题,新的展台推送和执行代码 iOS报刊亭:推送通知不会在后台启动应用Newsstand在恢复时重新启动下载并且iPhone报亭推送注册失败。检查你是否遗漏了这些答案中提到的任何内容。

These are other similar questions, new stand push and execute code, iOS newsstand: push notification does not launch the app in background, Newsstand restarts the download on Resuming and this iPhone Newsstand push registration Failure. Check if you are missing anything mentioned in those answers as well.

这是苹果文档和另一个博客

这篇关于应用程序关闭时,报亭应用程序下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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