diff --git a/Vector/AppDelegate.m b/Vector/AppDelegate.m index 703736e67..4a2057ff0 100644 --- a/Vector/AppDelegate.m +++ b/Vector/AppDelegate.m @@ -26,7 +26,7 @@ #import -#define MX_CALL_STACK_OPENWEBRTC +//#define MX_CALL_STACK_OPENWEBRTC #ifdef MX_CALL_STACK_OPENWEBRTC #import #endif @@ -338,17 +338,9 @@ { if (!isAPNSRegistered) { - if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)]) - { - // Registration on iOS 8 and later - UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIRemoteNotificationTypeBadge - |UIRemoteNotificationTypeSound - |UIRemoteNotificationTypeAlert) categories:nil]; - [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; - } else - { - [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationType)(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeBadge)]; - } + // Registration on iOS 8 and later + UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeBadge | UIUserNotificationTypeSound |UIUserNotificationTypeAlert) categories:nil]; + [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; } }