Local notification not working with ios app installed

I have an iOS and watchOS app where both can run independently, I am not using WatchConnectivity to send data back and fourth. The issue I'm having is that if I schedule a local notification on the watch and the phone is unlocked, it will not show on the watch for about 10-15 seconds. If I uninstall the iOS app or have the phone locked, it will show immediately on the watch.

To my understanding, this is somewhat the expected functionality but is there a way to bypass it? My app is a timer app and it really should not have a delay.

Yes, this is how things work now. First, to explain what is happening here: if you have both a phone and watch app installed, watchOS and iOS try to coordinate between phone and watch notifications. The concept here is that if there is a main app and a companion app, they could both be sending a notification, then the notification would alert on both, which is a deviation from how notification mirroring is handled if there is an iOS app but no watch app. The watch waits for the iOS notification to fire so they can determine if this is the same notification that needs to be deduped, displayed on one device but not the other, or separate notifications to be displayed both.

If the iOS app doesn’t send a notification on the phone, the watch will timeout after 13 seconds and alert anyway. The best solution to this is to send the same notification on both devices simultaneously, and ensuring the UNNotificationRequest.identifier matches on both notifications. This will let the systems determine how to handle the notification correctly and quickly, and the notification will alert right away.

We have had reports of varying degrees of success about this, and how well this solution will work for you will depend on the specifics of your implementation.


Argun Tekant /  DTS Engineer / Core Technologies

Is there a way to schedule the notification directly through WatchConnectivity? I have briefly tested this and it seems the way to do it is to send a message from the watch and then on receive, schedule that notification on the phone.

Is there a better way to be doing this though or a different message to schedule notifications on the companion app?

Local notification not working with ios app installed
 
 
Q