let provider = CXProvider(configuration: CXProviderConfiguration(localizedName: "My App")) provider.setDelegate(self, queue: nil) let controller = CXCallController() let transaction = CXTransaction(action: CXStartCallAction(call: UUID(), handle: CXHandle(type: .phoneNumber, value: "5555555555"))) self.controller.request(self.transaction, completion: { error in if(error != nil){ print(error) }
extension ViewController : CXProviderDelegate { func providerDidReset(_ provider: CXProvider) { } func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) { action.fulfill() } func provider(_ provider: CXProvider, perform action: CXEndCallAction) { action.fulfill() } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)