Commit 9de7f2a0 by Maurits van Beusekom Committed by GitHub

Merge pull request #289 from open-xchange/fix_notification_strategy_ios

iOS NotificationPermissionStrategy: Fixes wrong completionHandler call
parents 30314d66 2bd3b802
......@@ -37,7 +37,11 @@
completionHandler(PermissionStatusDenied);
return;
}
[[UIApplication sharedApplication] registerForRemoteNotifications];
completionHandler(PermissionStatusGranted);
}];
} else {
UIUserNotificationType notificationTypes = 0;
notificationTypes |= UIUserNotificationTypeSound;
......@@ -45,9 +49,10 @@
notificationTypes |= UIUserNotificationTypeBadge;
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:notificationTypes categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
}
[[UIApplication sharedApplication] registerForRemoteNotifications];
completionHandler(PermissionStatusGranted);
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment