I can successfully initiate a phone call within my app using the following:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@\"tel://12345678
With iOS 9.3.4, every technique that I try has control return to the calling app after the phone call. Has this behavior changed recently? This example is just a Swift and simplified version of https://github.com/jatraiz/RZTelpromptExample:
class ViewController: UIViewController {
let phoneNumber = "7204790465"
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
@IBAction func callWithTelPushed(sender: AnyObject) {
if let url = NSURL(string: "tel:" + self.phoneNumber) {
UIApplication.sharedApplication().openURL(url)
}
}
@IBAction func callWithTelpromptPushed(sender: AnyObject) {
if let url = NSURL(string: "telprompt:" + self.phoneNumber) {
UIApplication.sharedApplication().openURL(url)
}
}
@IBAction func callWithRZTelpromptPushed(sender: AnyObject) {
RZTelprompt.callWithString(self.phoneNumber)
}
}