Open Links in Safari (iOS)/Native Browser
Ah yes, that would not be possible in your case.
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Ah yes, that would not be possible in your case.
To create a result similar to using the Navigate to link function inside of an onclick event, use the following.
window.open(url, "_blank");
Opens the browser inside of the application window with a done button at the bottom to close the browser window.
Tested in IOS only.
This is totally not working for me for some reason.
I am using:
window.open(URL, '_system', 'location=yes');
also tried:
window.open(URL, '_system');
The link always opens in the app browser with no way to close it or go back.
this is on the xcode ios simulator and downloaded from xcode to phone/ipad.
Hi Matt - Where you want to open the link? What version of iOS you are using?
I want to open the link in the safari browser. I've tried it on iphone ios 7.0.4 and ipad 7.0.6 with no luck. The _system target doesn't seem to work for me.
Can you show how exactly you're using this code? It works for me as expected (iOS7.1).
On a button click I have a Run Javascript event:
codevar URL = localStorage.getItem('local_connection_URL');
var Status = localStorage.getItem('connection_status');
if (Status==="connected"){
window.open(URL,"_system");
}else{
console.log("The connections has not been completed by both parties, waiting on other party");
}/code
It opens the link but it is always in the inApp browser, not safari.
I've been checking into seeing if there is something in xcode (v5.0.2) that I need to change but have been unable to find anything yet.
How you define local storage variable URL?
The URL is loaded from the database to a label in a grid ="user_url_label". When the button is clicked, I have an event that sets local storage variable: "local_connection_URL" bind to component "user_url_label".
The same is then done with "connection_status"
Then I run the JS from the previous post. The correct URL is stored and it opens the correct location when I use window.open(URL,"_system");
It just opens in the in app browser instead of safari.
Are you using iframe on that page? If it possible can you give us public link to take a look?