0

系统调用接口主动挂调用代理方法:provider(provider: CXProvider, performEndCallAction action: CXEndCallAction),但是系统调用接口被动挂起如何实现系统接口调用结束?

4

1 回答 1

0
(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");
        }
    }];
}

结束通话时调用此函数

于 2017-01-18T04:52:56.327 回答