iOS 4.2 - Return to app after phone call

前端 未结 6 1693
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-29 22:56

I can successfully initiate a phone call within my app using the following:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@\"tel://12345678         


        
6条回答
  •  一整个雨季
    2020-11-29 23:53

    This is definitively possible since the introduction of iOS 4.0. The best way to handle this is to use a UIWebView, load the "tel:0123456" URL in the WebView without adding it to the view hierarchy. The iOS will automatically display an alert with the phone number and ask the user to confirm by pressing "Call".

    Once the call is completed, your app will be brought back to foreground automatically. This is detailed in this other thread: Return to app behavior after phone call different in native code than UIWebView

提交回复
热议问题