1

I started coding a few weeks ago and I'm starting to make my first app, it's very simple.

I want the app to make a phone call once the user taps a certain button. I've been looking online and all the forums look outdated.

How am I supposed to program this feature into Xcode? Any help will be greatly appreciated! :)

1 Answers1

7

Telephone number link is treated as a URL with the tel:// scheme:

@IBAction func makeCall(sender: AnyObject) {
    let url = NSURL(string: "tel://1234567890")!
    UIApplication.sharedApplication().openURL(url)
}
Code Different
  • 90,614
  • 16
  • 144
  • 163