Phone call from Apple Watch with openSystem API?

1.4k views Asked by At

As I watched the WWDC 2015 session video "Introducing WatchKit for watchOS 2" (at 13:29), I saw that it is possible to make phone calls directly on Apple Watch with the openSystem API. How can I use this API in Swift?

2

There are 2 answers

8
Paulw11 On BEST ANSWER

You can use the openSystemURL method, which is available on the shared WKExtension object. Pass a tel: URL to this method to initiate a phone call.

if let telURL=NSURL(string:"tel:5553478") {
    let wkExtension=WKExtension.sharedExtension()
    wkExtension.openSystemURL(telURL)
}
0
SprayKid982 On

There seems to be a bug in beta 1 that is not allowing the use of openSystemURL on phone numbers. I've seen several sample projects as well as banged my own head against the wall attempting to get going. No implementation I've seen works. SMS works fine however.