Search code examples
iosnotificationswatchkitapple-watchusernotifications

watchOS Notifications Delivering Quietly


Problem: Notifications created on the Apple Watch are only intermittently alerting the user to their existence. When swiping down from the top of the screen, Notification Center shows that the notification was received. Why are we not getting the alert every time?

We are setting notifications using Apple's recommended approach as outlined in the documentation for UNUserNotifications (), and we are using a custom static note interface.

We did not implement userNotificationCenter: willPresentNotification: withCompletionHandler:

Our app is not on screen: the Apple Watch is in sleep mode but unlocked, or on the watch face, or on the app picker screen.

It should be observed that the notification is scheduled between 15 seconds to 5 minutes into the future.

Yes, the Settings are such that ALL notifications should be alerting the user (do-not-disturb, deliver quietly, app permissions, the list goes on).


Solution

  • Identified Problem: Even when the screen dims/sleeps, the app might still be in the foreground.

    Identified Solution: Implement the UNUserNotificationCenterDelegate method userNotificationCenter: willPresentNotification: withCompletionHandler: and return UNNotificationPresentationOptionAlert or similar constant.