更新时间:2022-12-30 09:17:45
你的 didFailToRegisterForRemoteNotificationsWithError
方法没有被调用,因为注册没有失败——它甚至从未尝试过,因为用户拒绝了请求.
Your didFailToRegisterForRemoteNotificationsWithError
method isn't called, because the registration didn't fail - it was never even attempted because the user denied the request.
在 iOS7 上,您可以执行以下操作:
On iOS7 you can do a couple of things:
didRegisterForRemoteNotificationsWithDeviceToken
之前远程通知不可用UIApplication
对象上的 enabledRemoteNotificationTypes
值didRegisterForRemoteNotificationsWithDeviceToken
is calledenabledRemoteNotificationTypes
on the UIApplication
object