I want to perform the action on telephonic calls with the help of CallKit, but as per Apple documentation, it can be used to make VOIP calls only, is there any way through which I can make outgoing calls, end the current call and answer incoming telephone calls with the help of CallKit.
I am using private framework (TelephonyUtilities), trying to do the above mentioned activities.
NSBundle *bundlePath = [NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/TelephonyUtilities.framework"];
if ([bundlePath load]) {
Class TUCallCenter = NSClassFromString(@"TUCallCenter");
id tuCallCenter = [TUCallCenter sharedInstance];
}
But none of TUCallCenter methods allow me to initiate telephony call from my app. Although there are defined methods available. Some of which are :
- (id)_dial:(id)arg1 callID:(int)arg2 service:(int)arg3 sourceIdentifier:(id)arg4 dialType:(int)arg5 uniqueProxyIdentifier:(id)arg6;
- (id)_dialWithRequest:(id)arg1 completion:(id /* block */)arg2;
- (id)callWithCallUUID:(id)arg1;
- (id)callWithStatus:(int)arg1;
- (id)callWithUniqueProxyIdentifier:(id)arg1;
- (id)callsWithStatus:(int)arg1;
- (id)dial:(id)arg1 callID:(int)arg2 service:(int)arg3;
- (id)dial:(id)arg1 callID:(int)arg2 service:(int)arg3 sourceIdentifier:(id)arg4 uniqueProxyIdentifier:(id)arg5;
- (id)dial:(id)arg1 service:(int)arg2;
- (id)dialEmergency:(id)arg1;
- (id)dialEmergency:(id)arg1 sourceIdentifier:(id)arg2;
- (id)dialWithRequest:(id)arg1;
- (void)dialWithRequest:(id)arg1 completion:(id /* block */)arg2;
CallKit
Display the system-calling UI for your app's VoIP services, and coordinate your calling services with other apps and the system.
Overview
CallKit lets you integrate your calling services with other call-related apps on the system. CallKit provides the calling interface, and you handle the back-end communication with your VoIP service. For incoming and outgoing calls, CallKit displays the same interfaces as the Phone app, giving your app a more native look and feel. And CallKit responds appropriately to system-level behaviors such as Do Not Disturb.
In addition to handling calls, you can provide a Call Directory app extension to provide caller ID information and a list of blocked numbers associated with your service.
Receiving an Incoming Call
Receiving an incoming call method straight forward leads to PushKit silent notification which used in VOIP apps.
// MARK: PKPushRegistryDelegate
func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, forType type: PKPushType) {
// report new incoming call
}
So, there is no chance of using CallKit apart from VOIP apps.
https://developer.apple.com/documentation/callkit
Hope this helps to understand scenario.