你好,歡迎來到IOS教程網

 Ios教程網 >> IOS訊息 >> 關於IOS >> ios8中百度推送接收不到

ios8中百度推送接收不到

編輯:關於IOS

ios8中百度推送接收類型會有所改變:

//消息推送注冊

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)

{

[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings

settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge)

categories:nil]];

[[UIApplication sharedApplication] registerForRemoteNotifications];

}

else{

[[ UIApplication sharedApplication ] registerForRemoteNotificationTypes :( UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert )];

}

//取消推送

[[ UIApplication sharedApplication ] registerForRemoteNotificationTypes :( UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert )];

  1. 上一頁:
  2. 下一頁:
蘋果刷機越獄教程| IOS教程問題解答| IOS技巧綜合| IOS7技巧| IOS8教程
Copyright © Ios教程網 All Rights Reserved