[英]Why does registerForRemoteNotificationTypes sometimes fail?
I'm writing an IOS app with Push Notifications. 我正在用推播通知编写IOS应用程序。
I call registerForRemoteNotificationTypes
. 我称之为
registerForRemoteNotificationTypes
。
When I run it on my iPhone 4S IOS 5.1, i get didRegisterForRemoteNotificationsWithDeviceToken
. 当我在iPhone 4S IOS 5.1上运行它时,我得到
didRegisterForRemoteNotificationsWithDeviceToken
。
However 然而
When I run it on my iPad 1 IOS 5.1.1 or my iPad 2 IOS 6.1.3 I get didFailToRegisterForRemoteNotificationsWithError
. 当我在iPad 1 IOS 5.1.1或iPad 2 IOS 6.1.3上运行它时,我得到
didFailToRegisterForRemoteNotificationsWithError
。
The message is "no valid 'aps-environment' entitlement string found for application". 该消息是“找不到适用于应用程序的有效'aps-environment'授权字符串”。
What can I do to make it succeed on the iPads too? 我怎样做才能使其在iPad上也成功?
创建一个新的Provisioning Profile并在Xcode中选择Provisioning Profile将清除错误!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.