Skip to content

Instantly share code, notes, and snippets.

@larryluoo
Created July 8, 2022 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larryluoo/def11a57df7ff44825b359a900cd9dab to your computer and use it in GitHub Desktop.
Save larryluoo/def11a57df7ff44825b359a900cd9dab to your computer and use it in GitHub Desktop.
reportIncomingCall
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