简体   繁体   中英

Making a phone call from iPhone application

I am getting a little tricked up right now so I need some help. I have an iPhone app and within the app I want to be able to call a number. (Hopefully this is possible?)

I have looked at: http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/PhoneLinks.html

and I am a little confused. It has an with the tel:XXXXXXXX but in objective c and the iPhone sdk can you have just a plain link??

Right now I am trying to use something along the lines of the following:

[[UIApplication sharedApplication] openUrl:[NSURL URLWithString:@"tel:#######"]];

(the ##### is a my second phone number hardcoded in for testing purposes)

Thanks in advance.

你有什么应该工作,但不是在模拟器中

I'm not sure what your asking specifically. The code you have there should launch their dialer.

是的,这将在物理电话上工作,但它不会在模拟器中工作....我不明白你的问题是什么。

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