diff --git a/xdrip/View Controllers/Root View Controller/RootViewController.swift b/xdrip/View Controllers/Root View Controller/RootViewController.swift index ea792e64..e0a779e4 100644 --- a/xdrip/View Controllers/Root View Controller/RootViewController.swift +++ b/xdrip/View Controllers/Root View Controller/RootViewController.swift @@ -2982,7 +2982,12 @@ extension RootViewController: UNUserNotificationCenterDelegate { } else if notification.request.identifier == ConstantsNotifications.notificationIdentifierForVolumeTest { // user is testing iOS Sound volume in the settings. Only the sound should be played, the alert itself will not be shown - completionHandler([.sound]) + if #available(iOS 14.0, *) { + completionHandler([.sound, .list]) + } else { + // Fallback on earlier versions + completionHandler([.sound]) + } } else if notification.request.identifier == ConstantsNotifications.notificationIdentifierForxCGMTransmitterDelegatexDripError { diff --git a/xdrip/View Controllers/SettingsNavigationController/SettingsViewController/SettingsViewModels/SettingsViewAlertSettingsViewModel.swift b/xdrip/View Controllers/SettingsNavigationController/SettingsViewController/SettingsViewModels/SettingsViewAlertSettingsViewModel.swift index b6e57cbb..26ecc9af 100644 --- a/xdrip/View Controllers/SettingsNavigationController/SettingsViewController/SettingsViewModels/SettingsViewAlertSettingsViewModel.swift +++ b/xdrip/View Controllers/SettingsNavigationController/SettingsViewController/SettingsViewModels/SettingsViewAlertSettingsViewModel.swift @@ -71,9 +71,9 @@ struct SettingsViewAlertSettingsViewModel:SettingsViewModelProtocol { // define and set the content let content = UNMutableNotificationContent() - // body and title will not be shown, so contents can be empty - content.body = "" - content.title = "" + // body and title will not be shown, because app is in the foreground + content.body = "will not be shown" + content.title = "will not be shown" // sound content.sound = UNNotificationSound.init(named: UNNotificationSoundName.init("xdripalert.aif")) // notification request