Reputation: 7147
Can we use a button to make a phone call from the apple watch app?
For iPhone app we can use once the button is pressed:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://1111111111"]]);
Upvotes: 1
Views: 556
Reputation: 218
It's now possible from WatchOS2 :
if let telURL = NSURL(string: "tel:5553478") {
let wkExtension = WKExtension.sharedExtension()
wkExtension.openSystemURL(telURL)
}
Upvotes: 1
Reputation: 3520
You can't do this on Apple Watch itself. But there alternative ways like:
NOTE: The best way is always waiting for new versions. In WWDC 2015 taking place in San Francisco (June 8-12), they will introduce WatchKit 2 with support for the companion kits on iOS and the native watch apps that run on Apple Watch without having the iPhone nearby.
Upvotes: 0
Reputation: 5939
openURL
is silently ignored if the device is locked or the app is in the background. Additionally WatchKit doesn't contain an API for initiating a phone call.
Your best bet may be to prompt the user to open the iPhone app, possibly using Handoff, and tap a button to initiate the call from there. Not a great solution, but WatchKit is pretty limited right now.
Upvotes: 1