I have converted the code for making a phone call from Objective-C to Swift, but in Objective-C, we can set the type of the URL that we like to open (e.g. telephone, SMS, we
For making a call in swift, just use the following code: (I have tested it in XCode 11, swift 5)
let phone = "1234567890" if let callUrl = URL(string: "tel://\(phone)"), UIApplication.shared.canOpenURL(callUrl) { UIApplication.shared.open(callUrl)