unregisterForRemoteNotifications
像这样使用这个方法
[[UIApplication sharedApplication] unregisterForRemoteNotifications];
[[UAirship shared] unRegisterDeviceToken];
以下是苹果文档关于此方法的说明
Unregister for notifications received from Apple Push Service.
- (void)unregisterForRemoteNotifications
Discussion
You should call this method in rare circumstances only, such as when a new version of the application drops support for remote notifications. Users can temporarily prevent applications from receiving remote notifications through the Notifications section of the Settings application. Applications unregistered through this method can always re-register.
Availability
Available in iOS 3.0 and later.
See Also
– registerForRemoteNotificationTypes:
– enabledRemoteNotificationTypes
Declared In
UIApplication.h