我正在应用程序中实现报亭功能,虽然应用程序收到推送通知,但它并没有在后台模式下启动。
如果我点击通知警报,应用程序将启动,我可以看到字典中存在“内容可用”:1,并且问题已下载,但应用程序不会自动启动。
我已添加到 plist:
<key>UIBackgroundModes</key>
<array>
<string>newsstand-content</string>
</array>
和 didFinishLaunchingWithOptions:
[[NSUserDefaults standardUserDefaults]setBool: YES forKey:@"NKDontThrottleNewsstandContentNotifications"]; // for testing purposes
[[NSUserDefaults standardUserDefaults] synchronize];
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeNewsstandContentAvailability )];
我还看到我的应用程序未显示在“设置”->“商店”->“自动下载”下(其他杂志出现在那里)。
我错过了什么吗?这应该在沙盒环境中工作吗?