保证证书、推送证书、profile都没有问题,程序成功注册推送之后,一直在
didFailToRegisterForRemoteNotificationsWithError 里显示 “code=3000 aps-environment 的授权字符串” 错误,网上各种bundle identifier 不匹配之类的“答案”,照做,均无效。
最后发现是xocde 导入到手机的profile 一直是旧的,而我的在开发中心已经更新过profile,本地也下载了最新profile。这个时候,只需要在 Preferences->Accounts->View Details中,点击左下角的刷新按钮,更新本机的profile,同时删除手机上跟该应用相关的profile,重新 build 。 OK,问题解决了~
didFailToRegisterForRemoteNotificationsWithError 里显示 “code=3000 aps-environment 的授权字符串” 错误,网上各种bundle identifier 不匹配之类的“答案”,照做,均无效。
最后发现是xocde 导入到手机的profile 一直是旧的,而我的在开发中心已经更新过profile,本地也下载了最新profile。这个时候,只需要在 Preferences->Accounts->View Details中,点击左下角的刷新按钮,更新本机的profile,同时删除手机上跟该应用相关的profile,重新 build 。 OK,问题解决了~