CallKit - How to bring the CXCallController to the front
This is the expected behaviour of the callkit. Callkit allows us to answer or decline the call when the app is receiving the incoming call. After answering the call, the app has to manage all the actions.
- when the phone is locked, receive the incoming call, CXCallController will be visible, after answering the call, still you can see the CXCallController in the lock mode. After unlocking the phone, CXCallController will be invisible, the app has to manage the hangup, mute or hold options.
- when the phone is not locked, receive the incoming call, CXCallController will be visible, after answering the call, CXCallController will be invisible, the app has to manage the hangup, mute or hold options.
Switching from in-app UI to CallKit UI during two ongoing calls with one on hold
I found that the info that I got on stackoverflow on this topic were outdated. For the case where there's multiple calls on CallKit, the green bar will show even when your app is in the foreground given that your app is showing the status bar!
Previously it didn't appear on my app because I have set the status bar to be hidden on that particular page where the call is being made... so the solution is to detect when there is call being set to on hold (via callkit delegate) and show the status bar, and hide it when one of the calls ended and there's no more calls on hold.
When user clicks on the green bar while inside your app, it brings user back to the CallKit UI as expected.
CallKit UI for Outgoing Calls
If the user starts an outgoing call from within the native application and then locks the device they will see the native user interface. If the device is not locked; the user will not see the native user interface and requires you to implement your interface for handling actions. There is no way to utilize the native user interface while your application is in the foreground.
Displaying outgoing calls in Recents without CallKit UI
My mistake was thinking that reporting events to provider should be enough for call to appear in Recents. It turned out that I need to request transaction with CXStartCallAction
anyway. And there's no problem with UI (I was confused by docs saying "For incoming and outgoing calls, CallKit displays the same interfaces as the Phone app", it doesn't).
Found a clarification on the opposite problem and regarding incoming calls, but helpful.
Related Topics
What Is the Type of the Logical Operators
Subtle Cast Warning When Using SQLite.Swift ... Binding? to Any
In Swift,There's No Way to Get the Returned Function's Argument Names
Create an Outlet in Storyboard to an Inherited Property
How to Send Push Notifications Without Using Firebase Console
Opposite of _Conversion in Swift to Assign to a Value of a Different Type
Index Out of Range in Swift with Removeatindex
Why Can't I Mutate a Variable Initially Set to a Certain Parameter When the Func Was Called
Physics Detecting Collision Multiple Times
\N in the End of Line with Using Print
Google API - Invalid Credentials
What's the Best Way to Iterate Over Results from an API, and Know When It's Finished
Pattern Match and Conditionally Bind in a Single Switch Statement
Binding in a Foreach in Swiftui
Call Parent Constructor When Init a Subclass in Swift