didFailToRegisterForRemoteNotificationsWithError: user refused error?

前端 未结 4 2031
梦谈多话
梦谈多话 2021-02-04 07:22

If the user refuses the enable push notifications, we\'ll get an error, through didFailToRegisterForRemoteNotificationsWithError. Does anybody know what the code in the NSError

4条回答
  •  醉酒成梦
    2021-02-04 08:10

    To my experience, didFailToRegisterForRemoteNotificationsWithError: method is reserved for more serious cases which prevents the app from even showing the notification permission request dialog to the user. The cases that I know of include the app being run on devices that do not support push notifications, (e.g. Simulator) or some misconfiguration in the aps-environment entitlement in the app binary.

提交回复
热议问题