Making a phone call from the iPhone app

Now I'm a little cheating, so I need help. I have an application for the iPhone, and in the application I want to call the number. (Hope this is possible?)

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

and I'm a little confused. He has with his phone: XXXXXXXX, but in the c lens and iPhone sdk you can only have a simple link?

Now I am trying to use something in the following lines:

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

(##### - my second phone number is hard-coded for testing)

Thanks in advance.

+3
source share
3 answers

that you should work, but NOT in the simulator

+5

, . , , .

0

Yes, it will work on a physical phone, but it will not work in a simulator ... I don’t understand what your question / problem is.

0
source

Source: https://habr.com/ru/post/1775775/


All Articles