Created
July 8, 2022 09:38
-
-
Save larryluoo/def11a57df7ff44825b359a900cd9dab to your computer and use it in GitHub Desktop.
reportIncomingCall
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func reportIncomingCall(uuid: UUID, handle: String, hasVideo: Bool = false, completion: ((NSError?) -> Void)?) { | |
// 1. | |
let update = CXCallUpdate() | |
update.remoteHandle = CXHandle(type: .phoneNumber, value: handle) | |
update.hasVideo = hasVideo | |
// 2. | |
provider.reportNewIncomingCall(with: uuid, update: update) { error in | |
if error == nil { | |
print("calling") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment