Higgey
buzztouch Evangelist
Profile
Posts: 392
Reg: Sep 07, 2011
West Midlands
13,520
11/27/14 06:07 AM (9 years ago)

How to make web site links open in safari?

I am using the html pro screen in my iOS apps and I am using self hosted and downloading version 3. I would like to put a hyperlink in the text of my html pro screen which opens in Safari once clicked. I would like the existing html pro screen to open within the app not in Safari. At the moment, the hyperlinks that I'm inserting open only within the app not Safari. How do I get the links to open in Safari, please? Many thanks for your help. Kind regards, John
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
11/27/14 12:08 PM (9 years ago)
When they open in your App, what browser is it? LA
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
11/27/14 12:13 PM (9 years ago)
You might be able to put this code in there but not positive. [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.safari.com"]] LA
 
Higgey
buzztouch Evangelist
Profile
Posts: 392
Reg: Sep 07, 2011
West Midlands
13,520
like
11/27/14 12:15 PM (9 years ago)
Thanks, LA. They just stay within the same screen. I'll take a look at the string that you have suggested. I appreciate your time :) John
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
11/27/14 12:19 PM (9 years ago)
Just guessing on the code but let me know if it works. LA
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
11/27/14 03:56 PM (9 years ago)
could you not use the launch native app plugin to launch safari and create a link to that using html pro? Alan
 
Higgey
buzztouch Evangelist
Profile
Posts: 392
Reg: Sep 07, 2011
West Midlands
13,520
like
11/28/14 02:43 AM (9 years ago)
Thanks, Alan. I looked into the Launch Native App option but it does not give the facility to open a browser from an html link. Kittsy has a Pop Up WebView plugin which looks excellent and might do the job. It opens up a new screen but I'm not sure if it actually opens up safari, which I may need in order to satisfy apple. -- John
 
Higgey
buzztouch Evangelist
Profile
Posts: 392
Reg: Sep 07, 2011
West Midlands
13,520
like
11/28/14 05:52 AM (9 years ago)
Update - I decided to go for the Launch Native App plugin as it's so quick, easy and robust. Not exactly the effect that I was looking for but a good solution none the less. Gotta be flexible about these things sometimes! Thanks for ideas from everyone. -- John
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.