Can we register a call in CallKit but should not show CallKit Push notification/UI in foreground?

  Kiến thức lập trình

I need to display an alert when an incoming call is received while the app is in the foreground. I receive these incoming call notifications via a socket connection, and I display the alert when such a notification is received while the app is active.

When the app is in the background, I handle VoIP push notifications and present the call using CallKit.

My goal is to avoid displaying the native CallKit UI when the app is in the foreground, but still register the calls with CallKit to prioritize audio and prevent interruptions from other apps or calls. This allows us to maintain VoIP background capabilities while the call is active. Is this achievable?

LEAVE A COMMENT