problem using tel: URL to initiate a call

The iphone will dial a number using either of the formats listed below. But, it will do nothing if you are in the simulator. It took me 30 minutes of banging my head to figure this out.

[[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

Link for openURL documentation

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)