繁体   English   中英

iOS应用无法接收报亭通知

[英]iOS app cannot receive newsstand notification

我是iOS编程的新手,在开发报亭应用程序时遇到了一个真正的问题。 简而言之,该应用程序似乎没有收到报亭通知(我在didReceiveRemoteNotification和didFinishLaunchingWithOptions中具有NSLog,并且在XCode中运行应用程序期间未显示任何日志)。 我在info.plist中设置了所有需要的设置,我也将其包含在我的应用程序中:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// register for Push notification and don't use throttling for development
//[[UIApplication sharedApplication] unregisterForRemoteNotifications];
[[NSUserDefaults standardUserDefaults] setBool:YES  forKey:@"NKDontThrottleNewsstandContentNotifications"];
[[NSUserDefaults standardUserDefaults] synchronize];
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeNewsstandContentAvailability];

由于该应用程序能够处理常规的推送通知(警报,声音等),因此我认为这全都与节流有关,但是,如上所述,我将默认值设置为不使用节流。 我已经阅读了一些Apple的指南,并在许多论坛上进行了搜索,发现我需要在XCode Organized中将要使用的设备设置为“启用开发”。 但是我找不到任何复选框或按钮来进行设置。 我使用XCode 4.5。

有人可以帮我解决这个问题吗? 您是否知道如何调试通知并检查通知消失的地方?

您必须发送内容可用的推送通知:1,然后在设备中应用的报亭中将“自动下载”设置为“开”。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM