If the user refuses the enable push notifications, we’ll get an error, through didFailToRegisterForRemoteNotificationsWithError. Does anybody know what the code in the NSError object will be in this case (to differentiate it from, say, no connection being available)?
If the user refuses the enable push notifications, we’ll get an error, through didFailToRegisterForRemoteNotificationsWithError.
Share
I don’t think your initial statement (always) holds true. If an app is properly signed with a valid provisioning profile, calling
registerForRemoteNotificationTypes:will result inapplication:didRegisterForRemoteNotificationsWithDeviceToken:regardless of the user’s Notifications choices in the Settings app. From my experience, the only times I have seenapplication:didFailToRegisterForRemoteNotificationsWithError:get called was because of an improperly signed app. The error in question mentioned “no valid aps-environment entitlement found for application”.