Page 1 of 1

iOS and childbrowser issue

Posted: Thu Oct 03, 2013 10:00 am
by Nick

Hello,
I have a problem with childbrowser and iOS.
I am developing a hybrid app and everything works ok on Android.
I have a button that goes to facebook to get the user to login/authorize a (facebook) app to post on his behalf. The redirect url is a web page on a server i use. On Android, the user clicks the button, a childbrowser opens with the url:
https://www.facebook.com/dialog/oauth...

When the user clicks the button from an iOS device (i tried on iOS 7 ipad and iOS 6 iphone), a childbrowser opens, but the page is blank and nothing happens.
The command i use on page click is
window.plugins.childBrowser.showWebPage(URL, { showLocationBar: true,showAddress :true, });

Thanks in advance for your help


iOS and childbrowser issue

Posted: Thu Oct 03, 2013 10:41 am
by Kateryna Grynko

Hi Nick,

We'll test this. I'll update.


iOS and childbrowser issue

Posted: Thu Oct 03, 2013 10:46 am
by Nick

Btw i just tested another time with different url.
i have a "post on twitter" button and on click i run the following javascript

window.plugins.childBrowser.showWebPage('https://twitter.com/share?text=SOMETE...', { showLocationBar: true,showAddress :true, });

Same deal. Works on Android but on iOS i get a white page with "loading..." on the status bar.

Thanks!


iOS and childbrowser issue

Posted: Thu Oct 03, 2013 1:41 pm
by Kateryna Grynko

Hi Nick,

There is a typo in your code. Try the following:
prewindow.plugins.childBrowser.showWebPage(URL, { showLocationBar: true,showAddress :true}); /pre
Does it work for you?


iOS and childbrowser issue

Posted: Thu Oct 03, 2013 2:23 pm
by Nick

Do you mean the comma "after showAddress: true" ?
I removed it already and nothing changed. It works on Android but not iOS


iOS and childbrowser issue

Posted: Thu Oct 03, 2013 2:36 pm
by Kateryna Grynko

HI Nick,

Sorry, it will take some additional time to test it.


iOS and childbrowser issue

Posted: Thu Oct 03, 2013 2:54 pm
by Nick

Hey Katya,
Thanks for all your trouble but it seems the string i am passing to twitter and state parameter on facebook needs to be url encoded.
When i used

window.plugins.childBrowser.showWebPage('https://twitter.com/share?text=encode...', { showLocationBar: true,showAddress :true });

Everything works fine.

So thanks again for your time and please mark this as solved!