我在appDelegate的BackToVarbinary
0x0101010101010101010101
0x110011001100110011001100
0x111000111000111000111000
方法中有以下代码。
application:didFinishLaunchingWithOptions:
我做错了吗?
答案 0 :(得分:0)
您好,请在application:didFinishLaunchingWithOptions:
if ([application respondsToSelector:@selector(isRegisteredForRemoteNotifications)])
{
[application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
[application registerForRemoteNotifications];
}
else
{
[application registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound)];
}