iOS push新的调用方法
//?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:
?????(UIUserNotificationTypeBadge?|?UIUserNotificationTypeSound?|?UIUserNotificationTypeAlert)];
}
轉載于:https://www.cnblogs.com/-yun/p/4813858.html
總結
以上是生活随笔為你收集整理的iOS push新的调用方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: make and make bzIma
- 下一篇: Python学习笔记 ---第三章