Lars Soligard
Posts: 0
Joined: Tue Sep 16, 2014 5:31 pm

Get back after opening a link within the app

Hi appery!

I can't seem to figure out how to get back to the prevoious page when using window.open. I have tried the following running the app natively on my iPhone:

window.open(urlFromLocalStorage, 'system', 'location=yes');
window.open(urlFromLocalStorage, 'blank', 'location=yes');

The link works fine, but there is no way to get back. Any thoughts? Image

Lars Soligard
Posts: 0
Joined: Tue Sep 16, 2014 5:31 pm

Get back after opening a link within the app

Hi,

Sorry, I don't really understand. I thought the JS above created a new in-app browser instance?

window.open(urlFromLocalStorage, '_blank', 'location=yes');

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Get back after opening a link within the app

Hi Lars,

Could you please clarify on what iOS version you're testing this?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Get back after opening a link within the app

I've tested on iOS 8.1 and it works for me with 'Done' button in the bottom of the inAppBrowser window:
pre
codewindow.open(localStorage.getItem("urlFromStorage"), '_blank', 'location=yes');/code
/pre

Lars Soligard
Posts: 0
Joined: Tue Sep 16, 2014 5:31 pm

Get back after opening a link within the app

Thank's Illya.

As you can see from the screen shot in my first post, there is no such thing on my screen.

I get the following messages in Xcode:

ul
liCDVWebViewDelegate: Navigation started when state=1/li
li Failed to load webpage with error: CDVWebViewDelegate: Navigation started when state=1/li
liResetting plugins due to page load/li
liFinished load of: http://en.m.wikipedia.org/li
/ul

Any suggestions what might be wrong?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Get back after opening a link within the app

Hello!

Please clarify when do you receive those messages?

Lars Soligard
Posts: 0
Joined: Tue Sep 16, 2014 5:31 pm

Get back after opening a link within the app

I receive those messages when i run the app on my iPhone while it's connected to Xcode. In my app I have a button that on click event runs the following JS:

var urlFromLocalStorage = localStorage.getItem('_WikiURL');
window.open(urlFromLocalStorage,' _blank', 'location=yes');

That is when the messages appear.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Get back after opening a link within the app

Sorry, but app debugging is outside the scope of Appery.io platform support. You may try to find more information on those xCode messages online.

Does it work if you install app on device?

Return to “Issues”