How to make a Phone Call in SwiftUI. Here is the sample code with Swift and UIKit:
guard let number = URL(string: "tel://" + "+1(222)333-44-55") else { return }
UIApplication.shared.open(number)
Here is the thread for Swift and the UIKit Version:
How to make a Phone Call in SwiftUI. Here is the sample code with Swift and UIKit:
guard let number = URL(string: "tel://" + "+1(222)333-44-55") else { return }
UIApplication.shared.open(number)
Here is the thread for Swift and the UIKit Version:
 
    
     
    
    let numberString = "111-222-3334"
Button(action: {
    let telephone = "tel://"
    let formattedString = telephone + numberString
    guard let url = URL(string: formattedString) else { return }
    UIApplication.shared.open(url)
   }) {
   Text(numberString)
}
 
    
    