CallKit UI for Outgoing Calls - ios

I'm building a React Native VoIP app that uses react-native-callkeep to integrate the native call handling UI. For iOS it uses CallKit, and in the case of inbound calls when the app is running in the background or the screen is locked, the native UI pops up as expected and the user can interact with that UI to control the call.
However, in the case of outgoing calls the native UI never shows up. A bit of searching shows contradicting information regarding intended behavior here. The following state that this is expected behavior, and that your app needs to build the UI for outgoing calls:
CallKit - How to bring the CXCallController to the front
https://github.com/react-native-webrtc/react-native-callkit/issues/13
While these CallKit examples show outbound calls using the system UI:
https://agostini.tech/2019/06/16/intro-to-callkit/
https://medium.com/swlh/the-absolute-basics-of-ios-callkit-send-receive-a-call-1c2700e13f14
https://www.slideshare.net/GuillaumeBerthier2/manage-your-calls-with-callkit
Am I misunderstanding something fundamental here, or is there possibly an issue related to react-native?

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.

Related

How to implement callkit with connectycube on cordova ios application

Dear Connectycube Team,
I hope this email finds you well.
Our company has integrated Connectycube into our application, which primarily relies on video calling for communication between users and service providers. To ensure a seamless user experience, it's imperative that the video calling system is robust and reliable.
Unfortunately, our development team is facing challenges in making the system highly robust and 100% reliable. The issue lies in the connection dropping when the application is killed or the phone is locked.
issue: We are trying to integrate connecticube onto cordova app. We are using callkit to implement native incoming screen. The issue is that whenever the app is killed or the phone's screen is locked, accepting the call on callkit leads to failure since the accept call function gets called before the connecticube oncall event listener is called.
I would like to request a call with your technical team to discuss this matter and receive any insights or recommendations that could improve the video calling system.
Thank you for your assistance.
Best regards,
Kanhu
Once we receive incoming call using callkit and the user accepts the call, we try to send the accept call command to connectycube. But since the oncall event is not fired immediately, we create a callback loop to wait for the oncall event to get fired. This works sometimes but fails most of the time. Is there any other way ro achieve the accept call functionalities using callkit and connectycube on cordova.

Show custom UI for VoIP incoming and outgoing call and insert call details inside recents in phone app

All code present on StackOverFlow shows me how to show native phone call UI for outgoing and incoming calls. But I want this:
Show custom UI for Incoming call if app is in active state.
I will show my own UI, but want to report the system that a call has been received. But when I call reportNewIncomingCall method of CXProvider class it will automatically show native phone call UI even when the app is in UIApplicationStateActive state.
How to make an entry for receiving/answering calls showing custom UI instead of native call UI?
It's not possible to show a custom UI while the reported incoming call is ringing. One of the reasons could be that they wanted the UI to be consistent regardless of the phone state. Moreover, in this way they could probably achieve better integration with the native calls.

Callkit present Application UI instead of native UI

I want to use Callkit framework to present iOS native UI in incoming call for my voip app when smartphone is locked (more efficient than a simple notification), but after answering I would like to go to my app UI instead of one provided by callkit.
Preferentially I would like go immediately after answering the call, 2nd option would be a option in callkit UI to move to my app.
Any idea if that is possible? Didn't figure out any solution till now.
Thank you
Jose
CallKit provides the calling interface
https://developer.apple.com/documentation/callkit
Unfortunately there is no way to control calling interface for an incoming call.
When the device is locked, user will see native call UI after answering the call. If they wish to move to your app, they will have to tap corresponding button ("Messenger" button on the screenshot below):
When the device is unlocked, however, user will be redirected straight to your app automatically once they accept the call, so there is that.

Pickup call automatically in ios

What exactly I need is that when an incoming call come and my app is in foreground than the call must be automatically received and loudspeaker must be activated.
I have seen many post in SO saying that to intercept the calls is not possible in iOS.
But what if I use any VoIP API and make calls from it to my app[app to app call] ?
can I receive the call automatically in that case or that time also the SDK won't allow me to do so as its the core part of iOS I am too much confused.
This is not possible with UIKit, and furthermore if you did use private Apis your app would not be approved.

How to intercept and parse incoming calls via an app

How does Truecaller intercept incoming phonecalls on the iphone to display caller ID?
I didn't think this was possible from within the app?
Specifically, if I wanted to build this functionality, what protocols would I go about using?
http://www.truecaller.com/how-it-works
On an iPhone, without jailbreaking it:
- you cannot intercept a call in any way
- you cannot determine the phone number nor the caller ID identifying information regarding the call. Even if you could there
is no way to alter what is displayed on the call screen
- you cannot block the call
- your program can get a notification when a call is being made/terminated etc. But only if your app is executing in the
foreground at the time of the call or if the app is in the
background and has a relevant background mode (even then you can
only know there is a call in some circumstance, depending upon what
you're doing in the background and what state your in etc. Its too complex to describe the exact situation here briefly)
True Caller doesn't do that on iOS as it isn't supported with the native SDK. See their FAQ:
http://www.truecaller.com/support , specifically the "Why don't I receive live caller ID?" Section under "iPhone/Windows Phone". If you must though, try looking into a solution for jailbroken devices.
It's impossible to "intercept" calls. It is possible to handle the "background event call" when a iPhone get's a call. That said, Truecaller doesn't intercept calls. More info can be found on their website.

Resources