SteveLacy
Posts: 6
Joined: Fri Apr 20, 2012 11:54 pm

pushNotificationDeviceID not unique on iOS devices

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?

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

pushNotificationDeviceID not unique on iOS devices

Hello,

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

SteveLacy
Posts: 6
Joined: Fri Apr 20, 2012 11:54 pm

pushNotificationDeviceID not unique on iOS devices

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?

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

pushNotificationDeviceID not unique on iOS devices

Hi Steve,

Can you show the code you are using?

SteveLacy
Posts: 6
Joined: Fri Apr 20, 2012 11:54 pm

pushNotificationDeviceID not unique on iOS devices

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

SteveLacy
Posts: 6
Joined: Fri Apr 20, 2012 11:54 pm

pushNotificationDeviceID not unique on iOS devices

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!

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

pushNotificationDeviceID not unique on iOS devices

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

SteveLacy
Posts: 6
Joined: Fri Apr 20, 2012 11:54 pm

pushNotificationDeviceID not unique on iOS devices

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.

SteveLacy
Posts: 6
Joined: Fri Apr 20, 2012 11:54 pm

pushNotificationDeviceID not unique on iOS devices

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?

Return to “Issues”