开发者

Switching off Notification from device

开发者 https://www.devze.com 2023-01-21 21:28 出处:网络
How can we switch off notification from device开发者_JAVA技巧?Remote (Push) Notifications If you are talking about remote (push) notifications, you can unregister for remote notifications using the -

How can we switch off notification from device开发者_JAVA技巧?


Remote (Push) Notifications

If you are talking about remote (push) notifications, you can unregister for remote notifications using the - (void)unregisterForRemoteNotifications method in UIApplication (see the class reference).

However, Apple notes that users can disable push notifications on their own:

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.

Local Notifications

If you're talking about local notifications, you can use the - (void)cancelLocalNotification:(UILocalNotification *)notification or - (void)cancelAllLocalNotifications methods, also on UIApplication (see the class reference).

0

精彩评论

暂无评论...
验证码 换一张
取 消