Making a phone call from iPhone application
I am getting a little tricked up righ开发者_StackOverflowt 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.
what you have should work, but NOT in the simulator
I'm not sure what your asking specifically. The code you have there should launch their dialer.
Yeah, that will work on a physical phone but it won't work in the simulator.... I don't understand what your question/problem is.
精彩评论