Vin*_*nod 8 iphone xcode push-notification apple-push-notifications
我已经尝试了链接http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12中的示例,以获取我的iPhone推送通知消息.我可以成功运行除第一次注册推送通知应用程序的步骤之外的所有步骤.
我遵循了不同的代码变体:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
Run Code Online (Sandbox Code Playgroud)
但没有一个对我有用.我在我的iPhone 4中测试它,我的Xode版本是4.2,操作系统是Lion.请指教.
ndu*_*sis 31
您可以尝试以下方法:
另请参阅UIApplicationDelegate方法中的错误对象
application:didFailToRegisterForRemoteNotificationsWithError:
Run Code Online (Sandbox Code Playgroud)
编辑1
在文本编辑器中打开配置文件并查找字符串
<key>aps-environment</key>
Run Code Online (Sandbox Code Playgroud)
如果您的个人资料不包含此内容,则表示未正确设置推送.
| 归档时间: |
|
| 查看次数: |
27451 次 |
| 最近记录: |