开发者

launch native iphone application from within another

开发者 https://www.devze.com 2022-12-08 07:37 出处:网络
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 we

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...)

0

精彩评论

暂无评论...
验证码 换一张
取 消