简体   繁体   中英

How to make a phone call through programming

如何通过iOS编程拨打电话?

Use UIApplication:openURL method to open a resource from other program. This includes opening mail, phone number, google maps search etc..

So, in order for you to call somebody using the method, you can use

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:123456789"]];

I think you can use the tel:// URL to specify a phone number just like you would specify a web-page with http://

This makes it easy to transition from a web interface to a phone style voice interface. The format also theoretically supports alternative SIP providers and extensions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM