相关疑难解决方法(0)

iOS:如何注册推送通知?

我正试图通过Ray Wenderlich的指南为我的iOS 5应用程序实现推送通知:http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12 .

didFinishLaunchingWithOptions在我的AppDelegate 中将以下内容插入到我的方法中:

[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
    (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
Run Code Online (Sandbox Code Playgroud)

在我的设备(而不是模拟器)上运行应用程序时,不显示告诉我接受推送通知的弹出/警报.我在线上插入了一个调试点,我可以看到,registerForRemoteNotificationTypes调用了它.

为什么没有发生?

objective-c apple-push-notifications ios

10
推荐指数
1
解决办法
2万
查看次数