Page 1 of 2

Get back after opening a link within the app

Posted: Fri Nov 14, 2014 10:06 am
by Lars Soligard

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


Get back after opening a link within the app

Posted: Fri Nov 14, 2014 12:58 pm
by Maryna Brodina

Get back after opening a link within the app

Posted: Fri Nov 14, 2014 1:39 pm
by Lars Soligard

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');


Get back after opening a link within the app

Posted: Sun Nov 16, 2014 5:55 am
by Illya Stepanov

Hi Lars,

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


Get back after opening a link within the app

Posted: Sun Nov 16, 2014 9:31 am
by Lars Soligard

IOS 8.1


Get back after opening a link within the app

Posted: Sun Nov 16, 2014 9:12 pm
by Illya Stepanov

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


Get back after opening a link within the app

Posted: Mon Nov 17, 2014 7:48 pm
by Lars Soligard

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?


Get back after opening a link within the app

Posted: Mon Nov 17, 2014 8:38 pm
by Maryna Brodina

Hello!

Please clarify when do you receive those messages?


Get back after opening a link within the app

Posted: Mon Nov 17, 2014 8:48 pm
by Lars Soligard

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.


Get back after opening a link within the app

Posted: Mon Nov 17, 2014 9:00 pm
by Maryna Brodina

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?