Implement background download for newsstand application

I want to have a background autoload, and I have taken the following steps, but my application does not appear under Settings > Itunes & App Store > Automatic Downloads.

Here are my steps.

  • Set the required background mode: kiosk mode (it changed to "Application boot kiosk boot processes")
  • The app presents content at the newsstand: YES
  • On my didFinishLaunchOptions

I allow NKDontThrottleNewsstandContentNotificationfor testing.

City airship:

curl -v -X POST -u "<app key>:<master secret>" -H "Content-type: application/json" -H "Accept: application/vnd.urbanairship+json; version=3;" --data '{"audience":"all", "device_types" : ["ios"], "notification": {"ios": {"content-available":true, "sound": "default", "badge": 1, "priority":5}}}' https://go.urbanairship.com/api/push/

Background modes

[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NKDontThrottleNewsstandContentNotifications"];
  [[NSUserDefaults standardUserDefaults] synchronize];

   [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeNewsstandContentAvailability];

if ([launchOptions objectForKey:UIApplicationLaunchOptionsNewsstandDownloadsKey]) {

[self handleNewsStandUpdatePush];
}

NSDictionary *_remoteNotifUserInfo = [launchOptions  objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
if (_remoteNotifUserInfo != nil) {
  [self responseToRemoteNotificationWithUserInfo:_remoteNotifUserInfo];
 }

 for (NKAssetDownload *asset in [[NKLibrary sharedLibrary] downloadingAssets]) {
  [asset downloadWithDelegate:self];
 }

//Latest Urban Airship
 UAConfig *config = [UAConfig defaultConfig];
 [UAirship takeOff:config];
 [UAPush shared].userNotificationTypes = (UIUserNotificationTypeAlert |
                                         UIUserNotificationTypeBadge |
                                         UIUserNotificationTypeSound |
                                         UIRemoteNotificationTypeNewsstandContentAvailability);
 [UAPush shared].userPushNotificationsEnabled = YES;

Did I miss something?

+4
source share

No one has answered this question yet.


All Articles