2013-05-28 165 views
0

美好的一天,iOS Urban Airship取消註冊通知

適用於Urban Airship的iOS註冊API可用。基本上它只是

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

但是,似乎沒有任何API來註銷設備從接收通知根本沒有。我能做什麼?我的意思是,我可以「註冊」到一個「不活躍」別名帳號,但這似乎並不很好。

+0

recieving通知可以從應用程序設置停止page.Is還不夠嗎? –

回答

0

使用此方法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 
+0

這是爲城市飛艇嗎? –

+0

是檢查這個環節https://support.urbanairship.com/customer/portal/questions/11799-registering-and-unregistering-in-app-preferences – Divyu

+0

感謝您噠man.​​.i賤女孩笑 – raaj

相關問題