开发者

How can i make phone calls from my application?

i want to make an application which ma开发者_如何学编程kes phone calls.i am new in this field.Please give some guide lines.


The URL scheme format (according to the Apple URL Scheme Reference) is tel: NOT tel://. While the latter works now, it is not consistent with Apple's documentation and may not work in the future. Aside from that detail, Noah's and mihirpmehta's suggestions are the correct way to initiate a phone call from within your app. Keep in mind though, that your app will quit when the phone app is launched so you may want to save state before opening the URL.


use

[[UIApplication application] openURL:[NSURL URLWithString:@"tel://8005551212"]];

It will only work in iphone... not in simulator...


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜