Page 2 of 4

pushNotificationDeviceID not unique on iOS devices

Posted: Fri Dec 20, 2013 5:42 pm
by SteveLacy

Ran into a snag...

After changing my library to 1.2, the

window.plugins.childBrowser.showWebPage(the_link);

no longer works. I really need the childbrowser functionality on iOS. Any suggestions?


pushNotificationDeviceID not unique on iOS devices

Posted: Sat Dec 21, 2013 1:43 am
by Igor

Hello,

Please try to use InAppBrowser plugin instead of childBrowser. http://docs.phonegap.com/en/3.0.0/cor...


pushNotificationDeviceID not unique on iOS devices

Posted: Sun Dec 22, 2013 12:37 am
by SteveLacy

I had wanted to have the ability to go back to the app on iOS and that's not possible with the straight "window.open" command. It opens the URL, but there's no way to go back on iOS. With the childbrowser, there was a "Done" button that allowed the user to go back.

Any way to get the ability to go back from the URL on iOS?


pushNotificationDeviceID not unique on iOS devices

Posted: Sun Dec 22, 2013 12:44 am
by Illya Stepanov

Hi Steve,

Can you show the code you are using?


pushNotificationDeviceID not unique on iOS devices

Posted: Sun Dec 22, 2013 2:51 pm
by SteveLacy

My bad. I was using the window.open('http://apache.org'); without the '_blank' argument. The following works fine for me now:

window.open('http://apache.org', '_blank', 'location=yes');

Thanks for the help!

Steve


pushNotificationDeviceID not unique on iOS devices

Posted: Sun Dec 22, 2013 3:28 pm
by Illya Stepanov

Glad it works!


pushNotificationDeviceID not unique on iOS devices

Posted: Sun Jan 05, 2014 4:39 pm
by SteveLacy

After updating to library 1.2, the iOS device ID is now working properly! Yeah!

Although updating to library 1.2 introduced a new problem. My facebook login no longer works. I'm in the middle of debugging the problem and I've found that the "code" returned from Facebook is working, but the "token" is no longer functioning.

If you have a quick suggestion to fix this problem, it would save me some time. Thanks!


pushNotificationDeviceID not unique on iOS devices

Posted: Mon Jan 06, 2014 6:47 pm
by Maryna Brodina

Hello! Could you clarify what do you mean on ""token" is no longer functioning"? Is there any error?


pushNotificationDeviceID not unique on iOS devices

Posted: Mon Jan 06, 2014 11:17 pm
by SteveLacy

The Facebook login procedure per the tutorial requires the exchange of a code returned from Facebook for a Facebook token (see the section in the tutorial titled "Exchange the code for a user access token").

In my debugging, the Facebook code is still being retrieved (although it uses another option since the childbrowser isn't there anymore with library 1.2), but the portion that retrieves the Facebook token isn't working anymore.

If you have any suggestions, that would be great. Otherwise I'll slog through it to find out the problem caused by switching to library version 1.2.


pushNotificationDeviceID not unique on iOS devices

Posted: Tue Jan 07, 2014 6:12 pm
by SteveLacy

I found the problem, but I'm not sure how to solve it.

Here's what's going on...

  1. Before I initiate the Facebook login, I store a needed local storage variable.

  2. The Facebook code calls Facebook via the window.open command where the user logs into Facebook. The Facebook call has the return URL to the next page of my app (sending the user back to my app after succesful login).

  3. Everything works for the Facebook login, but when the return URL takes the user back to the app, my local storage variable (created in step 1) is gone.

    Got any suggestions?