System call interface active hanging call proxy method : provider(provider: CXProvider, performEndCallAction action: CXEndCallAction),but the system call interface passively hangs how to realize the system interface call end?

1

There are 1 best solutions below

0
On
(void)performEndCallActionWithUUID:(NSUUID *)uuid {
    if (uuid == nil) {
        return;
    }

    CXEndCallAction *endCallAction = [[CXEndCallAction alloc] initWithCallUUID:uuid];
    CXTransaction *transaction = [[CXTransaction alloc] initWithAction:endCallAction];

    [self.callKitCallController requestTransaction:transaction completion:^(NSError *error) {
        if (error) {
            NSLog(@"EndCallAction transaction request failed: %@", [error localizedDescription]);
        }
        else {
            [endCallAction fail];
            NSLog(@"EndCallAction transaction request successful");
        }
    }];
}

Call this function when you end the call