Page 1 of 5
Open Links in Safari (iOS)/Native Browser
Posted: Wed Dec 11, 2013 1:41 am
by Doug Black
I am trying to have a link in my app open the link in iOS Safari rather than in the app. I can't figure it out for the life of me. I've searched on here and tried some Javascript solutions, but can't figure it out. Help...please. 
Open Links in Safari (iOS)/Native Browser
Posted: Wed Dec 11, 2013 2:06 am
by maxkatz
What script(s) did you try?
Open Links in Safari (iOS)/Native Browser
Posted: Wed Dec 11, 2013 9:30 am
by Doug Black
The regular link component opens the page in the app. I had tried to create labels that, when clicked, opened links in new windows (worked in webapp, did nothing in iOS app).
I had tried:
precodenavigator.app.loadUrl("http://www.potomacag.org/", { openExternal:true } );/code/pre
Which did nothing in iOS app.
I also tried the myNavigate that was posted here.
I specifically have an iPhone and iPad with iOS 7,0.3 on them. It seems to be a problem that is familiar in PhoneGap.
Thanks for your help!
Open Links in Safari (iOS)/Native Browser
Posted: Wed Dec 11, 2013 11:58 am
by Kateryna Grynko
Open Links in Safari (iOS)/Native Browser
Posted: Wed Dec 11, 2013 12:20 pm
by Doug Black
Thanks Katya! Unfortunately, it still opens the page in the app. I'm trying to open the page specifically in Safari.
Open Links in Safari (iOS)/Native Browser
Posted: Wed Dec 11, 2013 1:19 pm
by Doug Black
Disregard. Didn't see both links. The second one works:
codewindow.open(the_link, "_system");/code
Open Links in Safari (iOS)/Native Browser
Posted: Wed Dec 11, 2013 1:23 pm
by Kateryna Grynko
Doug,
Thank you for the update!
Open Links in Safari (iOS)/Native Browser
Posted: Mon Feb 03, 2014 10:39 pm
by Nathan Friend
That does work, but I am curious about what the difference is between window.open(url, "_system"); and the Navigate to Link option under Events. When Open in new window is selected the application uses a completely different method for opening the new window. Could someone at Appery explain the difference in these two solutions and if there is a way to take advantage of the functions behind "Navigate to Link" please? Thanks in advance!
Open Links in Safari (iOS)/Native Browser
Posted: Mon Feb 03, 2014 10:47 pm
by Nathan Friend
One way of doing this would be if there was a way to pass the params in dynamically when using Navigate to Link. Maybe there is a way to do that, I am just not aware of how that would be done.
In my case what I would like to accomplish is to create dynamic social sharing links for each dataset in a grid. That is why I am interested in taking advantage of the Navigate to Link event but need to create it dynamically and pass the url param in on click / tap.
Open Links in Safari (iOS)/Native Browser
Posted: Mon Feb 03, 2014 11:00 pm
by Doug Black
I had to use the JavaScript because the link opened in the app and lead to a donation page ( a no-no for Apple). I like your idea below!