frenchie frenchie - 1 year ago 197
iOS Question

How to end a call in CallKit

This is not a give-me-code question, this is a feasibility question. If I initiate a phone call using CallKit, is it also possible to programmatically end it?

Thanks.

Answer Source

Yes, we can do programmatically, but we have to keep the UUID for that call,

CXEndCallAction *endaction = [[CXEndCallAction alloc] initWithCallUUID:callUUID];
[cxcallcontrollerobject requestTransaction:[CXTransaction transactionWithActions:@[action]] completion:completion];

Hope this helps.