Skip to content

Commit 5cc5988

Browse files
committed
Merge branch 'release/1.2.6'
2 parents 8ca5f53 + 236011f commit 5cc5988

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PackageDescription
55

66
let package = Package(
77
name: "Pam",
8-
platforms: [.iOS(.v14)],
8+
platforms: [.iOS(.v11)],
99
products: [
1010
// Products define the executables and libraries a package produces, and make them visible to other packages.
1111
.library(

Sources/Pam/Pam+UNUserNotificationCenterDelegate.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ import UserNotifications
1010

1111
extension Pam: UNUserNotificationCenterDelegate {
1212
public func userNotificationCenter(_: UNUserNotificationCenter, willPresent _: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
13-
completionHandler([.sound, .badge, .banner])
13+
if #available(iOS 14.0, *) {
14+
completionHandler([.sound, .badge, .banner])
15+
} else {
16+
completionHandler([.sound, .badge])
17+
}
1418
}
1519

1620
public func userNotificationCenter(_: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {

0 commit comments

Comments
 (0)