Hello!
I’m building a VoIP app for iPhone and Apple Watch using PushKit and CallKit.
I’m trying to understand the recommended watchOS architecture for this kind of setup. What we would like is for the watch to behave as an endpoint for incoming calls, so that when a call comes in the user can answer on either the iPhone or the watch.
My understanding is that VoIP notifications are not supported on watchOS, so for incoming calls what we ended up having to do was send the watch a regular APNs alert notification and only start the actual call setup after the user interacts with it.
This isn’t ideal, and the notification often appears a few seconds late. What we would like to be able to do is present the incoming call on the watch more like how FaceTime calls appear on Apple Watch.
So I wanted to ask whether this is the intended pattern for a companion watchOS VoIP app. Is using a regular APNs alert notification the correct way to surface an incoming call on the watch, or is there a better supported approach?
Thanks!
My understanding is that VoIP notifications are not supported on watchOS.
That's incorrect. VoIP notification support was added in watchOS 9 at the same time CallKit support was introduced. Our Speakerbox sample project actually includes a watchOS target, including PushKit support.
Having said that, I did want to clarify something on this point:
the notification often appears a few seconds late.
Many developers assume/believe that VoIP pushes are faster and/or more reliable than standard pushes, but that assumption is largely false. More specifically, a high priority alert push has EXACTLY the same delivery behavior as a VoIP push— basically "deliver this push at the first possible chance". You can actually see this in "Sending End-to-End Encrypted VoIP Calls" architecture, which doesn't use VoIP pushes at all.
The kind of delay you're seeing is typically caused by the combination of:
-
Using lower priority standard push.
-
Delays in notification processing and presentation.
-
The devices being in significantly different network configurations.
...not any difference between standard and VoIP pushes.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware