I want to add my app in the contact info in the address book for messaging, video calls.
This functionality can be achieve using CallKit, in short CallKit provides native phone app UI to all the VoIP application, to let your app visible in the contact (after integrating the CallKit), you just need to smoothly long press the audio/video call buttons.
By default It shows the most frequent used app (say WhatsApp), once you'll long press the icons it'll show a list of the supporting apps (VoIP enable apps). From where you can choose the app to perform the action.
The screenshots will make you more sense to figure it out.
Image 1 - is the default situation I.e. default call and video option.
Image 2 - Long press the call option, It’ll show all the apps which are capable to make audio call.
Image 3 - Same for the video option.
Image 4 - Once you’ll use any app (suppose WhatsApp) the default icon will change to WhatsApp and in the list it’ll start showing WhatsApp and other concern apps.
Source: #1 Ray Wenderlich Toutorial , #2 Sample Code of CallKit Objective-C & Swift both
Note: - In the list below it’ll start showing the apps name once you use any app to make call. And it’ll remain listed even if you uninstall that particular app.
I assume you are using CallKit. So adding .phoneNumber to supportedHandleTypes gives this ability that you can call number via your application.
.generic also gives ability you can start call from history that made or received via your application.
let config = CXProviderConfiguration(localizedName: "anyname you want")
config.supportedHandleTypes = [.phoneNumber,.generic]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With