apollo mcowiti
Posts: 0
Joined: Sat Apr 18, 2015 2:21 am

pushNotificationDeviceID always undefined when app installed in iphone6

I developed an app with jquery mobile.
I exported the app to an .ipa file and installed it on iphone6. It works fine.
But "pushNotificationDeviceID" never populates in the devices collection ( i even tried detaching and re-attaching the database as suggested in some forums).

I tried to see if it is generated on device ready event, as the forums suggest (code below), but it is always undefined.

setTimeout(function() {
alert(localStorage.getItem('pushNotificationDeviceID'));
}, 4);

Help.

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

pushNotificationDeviceID always undefined when app installed in iphone6

Hello -

We have tested and everything works correctly on iOS devices.

Can you let us know which device you're using and what Libraries version are set for your Appery.io project?

On which event in your app you're running the JS code?

apollo mcowiti
Posts: 0
Joined: Sat Apr 18, 2015 2:21 am

pushNotificationDeviceID always undefined when app installed in iphone6

1) Device runs iOS 9.1
2) Library versions 3.0
Built in resources version
cordova 4.0
jquery 2.1.1
jquery mobile 1.4.5
underscore 1.7.0

3) the JS code is on the very first page of my project and attached on Device Ready event

apollo mcowiti
Posts: 0
Joined: Sat Apr 18, 2015 2:21 am

pushNotificationDeviceID always undefined when app installed in iphone6

1) Device runs iOS 9.1
2) Library versions 3.0
Built in resources version
cordova 4.0
jquery 2.1.1
jquery mobile 1.4.5
underscore 1.7.0

3) the JS code is on the very first page of my project and attached on Device Ready event

apollo mcowiti
Posts: 0
Joined: Sat Apr 18, 2015 2:21 am

pushNotificationDeviceID always undefined when app installed in iphone6

) Device runs iOS 9.1
2) Library versions 3.0
Built in resources version
cordova 4.0
jquery 2.1.1
jquery mobile 1.4.5
underscore 1.7.0

3) the JS code is on the very first page of my project and attached on Device Ready event

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

pushNotificationDeviceID always undefined when app installed in iphone6

Thank you, we need some time to test it additionally on the device.

apollo mcowiti
Posts: 0
Joined: Sat Apr 18, 2015 2:21 am

pushNotificationDeviceID always undefined when app installed in iphone6

thanks, let me know what you find out

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

pushNotificationDeviceID always undefined when app installed in iphone6

On our devices everything works correctly with this JS code.

apollo mcowiti
Posts: 0
Joined: Sat Apr 18, 2015 2:21 am

pushNotificationDeviceID always undefined when app installed in iphone6

I am absolutely unable to get a deviceID/token registered.

The registration did occur once, and only once, but after i uninstalled the app, and many re-installs of the .ipa later, no deviceID/token has been generated again.

Are there some other items, processes/preconditions that i am unaware of that has effect to this registration? Is it possible that the appery.io packager (the appery.io flash screen i see as the app is starting on the device) is completing too fast and not be having enough time to register the device?

Return to “Issues”