Newsstand App download when app is closed

旧街凉风 提交于 2019-12-23 18:51:05

问题


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.

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

Am I missing something?

Shouldn't the push lead to my

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

being called with UIApplicationLaunchOptionsRemoteNotificationKey?

Help much appreciated!


回答1:


As per this article,

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.

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

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.

Here is the apple documentation on this and another blog on this.



来源:https://stackoverflow.com/questions/13031589/newsstand-app-download-when-app-is-closed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!