Post

Replies

Boosts

Views

Activity

interruptionLevel crashes the iOS App on Silicon Macs
I recently added time-sensitive notifications to my iOS / iPadOS App. let content = UNMutableNotificationContent() if #available(iOS 15.0, *) {         content.interruptionLevel = .timeSensitive } The if #available works fine on iOS 15 and it is ignored on iPadOS or older iOS builds, but it's making the (designed for iPad) App crash when running on Apple Silicon Macs. I am getting the following error: Value of type 'UNMutableNotificationContent' has no member 'interruptionLevel' I tried to add another check but it doesn't work either: #if os(iOS)       if #available(iOS 15.0, *) {         content.interruptionLevel = .timeSensitive       } #endif
1
0
875
Oct ’21
interruptionLevel crashes the iOS App on Silicon Macs
I recently added time-sensitive notifications to my iOS / iPadOS App. let content = UNMutableNotificationContent() if #available(iOS 15.0, *) {         content.interruptionLevel = .timeSensitive } The if #available works fine on iOS 15 and it is ignored on iPadOS or older iOS builds, but it's making the (designed for iPad) App crash when running on Apple Silicon Macs. I am getting the following error: Value of type 'UNMutableNotificationContent' has no member 'interruptionLevel' I tried to add another check but it doesn't work either: #if os(iOS)       if #available(iOS 15.0, *) {         content.interruptionLevel = .timeSensitive       } #endif
Replies
1
Boosts
0
Views
875
Activity
Oct ’21