Post

Replies

Boosts

Views

Activity

Critical Alerts and Notification Permissions
Back story: I'm developing an app that communicates with a personal medical device. We use critical alerts when we have hardware issues that could result in harm to the patient. The audio file is a 30 second file to make sure the patient is aware. If the app is open when they occur, we pop up a modal message in the app. When the user dismisses the notice, we call UNNotificationCenter::removeDeliveredNotifications(withIdentifiers:) to remove the critical alert and also to stop the audio file that is playing. This normally works fine. However we discovered that if the patient leaves critical alert enabled but disables notifications for our app, that we can still post the critical alert and it goes off. However when the user dismisses the message, the removeDeliveredNotifications call does not work. I did some debugging and if call getDeliveredNotifications with this permission combination, it return 0 (normally it would return 1). Does anyone know of another way to remove the critical alert in this situation? (or should I be submitting this as a bug?)
1
0
207
Sep ’24
Critical Alert Throws exception
I have a critical alert entitlement for my app. My profile has been updated and the critical alert implemented. Everything works fine. User gets the request for critical alert. Alert works as it is supposed to wrt do not disturb. When I try to debug, if I turn on an exception breakpoint, I get stopped by a C++ exception when I go to request authorization just by creating a UNAuthorizationOptions such as below. let options: UNAuthorizationOptions = [.alert, .sound, .criticalAlert] The app continues and the exception is non-fatal, it is just annoying when trying to debug. Any suggestions? (Also. I do all my coding in Swift, so not sure how to get the description of the exception out of lldb)
0
0
341
Jun ’21