Element iOS doesn't need to send VoIP push notifications again through Sygnal; can use local on-device API
I was adding some documentation to Sygnal describing the workaround that we use for VoIP calls and push notifications (basically: from the Notification Service Extension, sending a special VoIP notification to Sygnal which then comes back to iOS).
David noticed that there appears to be a function you can call (https://developer.apple.com/documentation/callkit/sending_end-to-end_encrypted_voip_calls) allowing you to avoid contacting Sygnal — it sounds like it is doable entirely on device (I'm not sure when this appeared; it might be new).
Some related links:
- https://github.com/vector-im/element-ios/pull/3531 (the original PR when this was introduced — I think)
- https://github.com/matrix-org/sygnal/issues/235#issuecomment-885741255 (this workaround was mentioned here)
I thought I should bring it to your attention. Equally, if you know why this isn't usable, I'd like to be able to add that to the Sygnal documentation for other app developers. Thank you! :)
Quoting a new comment from David:
https://developer.apple.com/documentation/callkit/cxprovider/3727263-reportnewincomingvoippushpayload says it's available in iOS 14.5+, iPadOS 14.5+, Mac Catalyst 14.5+ . Apparently released end of April this year.
It needs a special Notification Filtering authorization entitlement from Apple : https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_usernotifications_filtering