I have a button in my obj-c application that I would like to launch the iphone text application when a button is pressed.
i’ve looked at the solution here How to use iPhone Custom URL schemes and have attached an action to my button (via the ‘touch up inside’ event), but the text app doesn’t launch when the button is pressed.
here is my code
(IBAction)sendMsgBtnPressed:(id)sender {
NSLog(@"sendMsgBtnPressed");
NSString *stringURL = @"sms:+14155551212";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
[stringURL release];
}
i know this is being called because i can see the NSLog() output in my console. When I use a http:// scheme it works fine & launches Safari but sms: does not appear to work. Any idea what I am missing here?
Notice that the SMS application will be opened ONLY in iPhone device – not simulator and not iPod Touch.
The SMS application doesn’t exist on simulator and iPod Touch…