ios making call programmatically without quitting app

故事扮演 提交于 2019-12-06 12:52:24

If you're trying to make some kind of dialer - than NO. It's impossible in ios

What I understand from your question is to call and after you finish, go back to the app. Is it?

Your scheme need look like this:

NSURL *url= [NSURL URLWithString:[NSString stringWithFormat:@"telprompt://%@", phoneNumber]];
[[UIApplication sharedApplication] openURL:url];

Use telprompt instead tel.

What you want can be done using below statement.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"telprompt://%@", telNumber]]];

What till will do is when you press call button, it will ask you for confirmation to dial or cancel. When you say call, the call goes and once call ends, you will see the app open with last visited page.

Using telprompt, you get return to app when call ends.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!