0

ok, i'm not asking how to modify my existing iphone app to make this happen, i can do that. i am trying to make links that i have showing up in my app's existing webview open in Safari instead of the existing webview as was originally designed. I want to make this work for existing app users that don't upgrade.

so in my webview i load a page on my server that has html links... is there any code (tag, class, html, java, etc) that i can use that will cause these links to be opened in Safari and not just within the webview?

thanks for the help. i've been looking all over, no luck... yet-

user625435
  • 21
  • 1
  • 3

1 Answers1

0

The only way you can open another application from your app is to use the openURL method on UIApplication: (example)

[[UIApplication sharedApplication] openURL:url]  

Unfortunately this means you can't make Safari launch instead of your webview via some change to the HTML content. It will require an update to your app.

Taking a step back this makes sense given that such a feature would allow web developers to hijack non-safari-browser apps forcing them to use Safari. It probably wouldn't even make sense to do so, but it would lead to some confusion on the end-user's part, and maybe there's some security implications too.

Community
  • 1
  • 1
Ken Pespisa
  • 21,989
  • 3
  • 55
  • 63
  • thanks, ya, that snippet didn't do it and it doesn't look like there's anything that acts like the mailto: and tel: links to trigger safari and i can't redirect that webview page. – user625435 May 01 '11 at 03:24