0
我在appDelegate中的application:didFinishLaunchingWithOptions:
方法中有以下代碼。通知在iOS9中出現兩次
if([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings];
}
我做錯了什麼?
仍然得到通知,試試這個的兩倍。 isRegisteredForRemoteNotifications如何產生影響? – Chinmay