Newsstand App download when app is closed

2019-07-03 05:07发布

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条回答
男人必须洒脱
2楼-- · 2019-07-03 05:37

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.

查看更多
登录 后发表回答