【发布时间】:2013-03-30 21:52:33
【问题描述】:
我在本教程中做了所有事情:
http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12
我创建了证书、app_id 和一个 Provisioning 配置文件,并尝试在委托文件中使用带有以下简单代码的推送通知服务:
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
// Let the device know we want to receive push notifications
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
我在 iPad 上尝试了我的应用程序,但它不起作用。 iOS 不会询问我是否允许我的应用使用推送通知,也不会在“设置”>“通知”列表中显示我的应用。 我在编译或运行我的应用程序时没有收到错误..
错误
我刚刚实现了“didFailToRegisterForRemoteNotificationsWithError”方法,我在运行应用程序时遇到了这个错误
2013-03-31 00:11:10.481 PushAppCalisma [272:907] {
NSLocalizedDescription = "no valid 'aps-environment' entitlement string found for application";
}
【问题讨论】:
-
您是否从配置文件配置了应用 ID 以支持远程通知?
-
是的,我想你是在问上面的图片?...
-
你实现了 application:didFailToRegisterForRemoteNotificationsWithError: 你得到什么错误?
-
激活“生产推送 SSL 证书”后,我声明收到此错误“未找到包含任何钥匙串签名证书的未过期配置文件”
-
生产证书用于应用发布时,开发过程中使用开发。
标签: iphone ios apple-push-notifications