if (@available(iOS 10 , *)){ weakify(self); [[UNUserNotificationCenter currentNotificationCenter] getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) { if (settings.authorizationStatus == UNAuthorizationStatusDenied){ // 没权限 } }]; }else{ UIUserNotificationSettings * setting = [[UIApplication sharedApplication] currentUserNotificationSettings]; if (setting.types == UIUserNotificationTypeNone) { // 没权限 } }