Search code examples
objective-ccallkit

iOS CallKit Outgoing Call Don't Support Holding


When I have an incoming call, I can set supportsHolding to NO in CXCallUpdate.

But how can I do the same in an outgoing call?

My goal is that if a new GSM call wants to interrupt, make iOS don't show the option to hold this call, only hanging up.


Solution

  • I found the solution.

    A CXCallUpdate can be sent to the outgoing call also.

    I report the update in the completion block of requestTransaction:

    [callController requestTransaction:transaction completion:^(NSError* _Nullable error) {
        if (error) NSLog(@"iOS Call Start Error: %@", error);
        else
        {
            CXCallUpdate* update = [CXCallUpdate new];
            update.supportsHolding = NO;
            [provider reportCallWithUUID:uuid updated:update];
        }
    }];