I wanted from within my application to open another native iPhone application installed on the device. I used openUrl method and give it the URL schema for that application but it always launch the web application not the native one. Is there a way I can launch the native application instead? I would appreciate any help.
Thanks in advance,
Sarah 开发者_如何学JAVA
You can only open applications that have registered in the system. For example:
Mail:
[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto://aaa@bbb.com"]];
Phone:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://8004664411"]];
SMS:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms:55555"]];
Tweetie:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tweetie://"]];
Note
This will ONLY work if the application has a registered prefix (tel
, sms
, tweetie
, etc...)
精彩评论