user676446
user676446

Reputation: 13

Need help with openURL:[NSURL URLWithString:@"tel:+91 (number)"]] from an iPhone app

I need to call a number +91 (number),but if i use tel:// url it does not make a call from a iphone app. How to call a number coming in any format.

Upvotes: 0

Views: 1380

Answers (1)

Jhaliya - Praveen Sharma
Jhaliya - Praveen Sharma

Reputation: 31722

The iphone will dial a number using either of the formats listed below.

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

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

[[UIApplication sharedApplication] 
                    openURL:[NSURL URLWithString:@"tel:1-541-555-1234"]];

Link for Apple documentation on the tel: url scheme

Upvotes: 1

Related Questions