Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS城市飞艇注销通知_Ios_Urbanairship.com - Fatal编程技术网

iOS城市飞艇注销通知

iOS城市飞艇注销通知,ios,urbanairship.com,Ios,Urbanairship.com,你好 iOS上的城市飞艇注册API可用。基本上只是 [[UAPush shared] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | U

你好

iOS上的城市飞艇注册API可用。基本上只是

[[UAPush shared] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
                                                     UIRemoteNotificationTypeSound |
                                                     UIRemoteNotificationTypeAlert)];

然而,似乎根本没有任何API来取消设备接收通知的注册。我能做什么?我的意思是我可以将其“注册”到“非活动”别名帐户,但这似乎不是很好。

使用此方法
取消注册远程通知

[[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

可以从应用程序设置页面停止接收通知。这足够吗?这是城市飞艇吗?是,请检查此链接