4

I want to have background auto download and I did the following steps but my app does not appear under Settings > Itunes & App Store > Automatic Downloads.

Here are my steps.

  1. Set Required background mode : newsstand-mode (it changed to "App processes Newsstand kit downloads")
  2. Application presents content in Newsstand : YES
  3. At my didFinishLaunchOptions

I have enable the NKDontThrottleNewsstandContentNotification for testing.

Urban Airship call:

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;

Am I missing something here?

John Hascall
  • 9,176
  • 6
  • 48
  • 72
shoujo_sm
  • 3,173
  • 4
  • 37
  • 60
  • http://www.viggiosoft.com/blog/blog/2011/10/17/ios-newsstand-tutorial/ ....._______ https://github.com/viggiosoft/NewsstandTutorial .. m guessing this didn't helped .!!! – rahul_send89 Oct 03 '14 at 02:47

0 Answers0