I am having trouble with Ionic.io push notifications. I can’t get the push notification to work in dev-mode or with real notifications for iOS and Android.
In dev mode I can see that the browser polls for new notifications correctly, but the push notification is never received by the client.
With “real notification”-mode the device (if iOS) asks the user for push permission. The device receives a token. However the push notifications sent is never received by neither iOS-devices or Android-devices.
I’ve checked the io API-key and APP-id and they’re correct.
If I check the status of the push notifications using the API, I can see that the push notifications have their state set to enqueued.
Sorry, I can’t provide a solution. I’ve got the same issue. All my PNs are “state”: “enqueued”, have been since migrating to 2.0.0-beta.
Tokens are created fine. The device asks for permission to send notifications. Dev pushes are set to false.
A sample response:
curl -H "Authorization: Bearer MYAPIKEY" https://api.ionic.io/push/notifications
{"config": {"notification": {"message": "ASB recommends Daddy's Home (2015) because If you like Will Ferrell and Mark Wahlberg you'll enjoy this. Many people don't of course :p"}, "profile": "recprod", "tokens": ["85ec51c9a4b1d624557514fc523693c3464a65dc3529c1d4dee93cc399773911"]}, "uuid": "da8984f1-9b79-4790-b80e-3a877d6472bc", "state": "enqueued", "status": "locked", "created": "2016-03-29T02:53:04.088643+00:00", "app_id": "myAPPID"}
Cordova CLI: 6.1.0
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic Version: 1.2.4-nightly-1917
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: 1.8.5
ios-sim version: 5.0.3
OS: Mac OS X El Capitan
Node Version: v0.12.7
Xcode version: Xcode 7.3 Build version 7D175
Since I wasn’t able to solve this within a reasonable timeframe, I went for a solution that didn’t include Ionic.io instead. I used the Cordova push plugin and set up an own backend for registering devices and sending push messages to APNS / GCM. Works great, and was done in like an hour.
So some days ago my token from my iPhone was always recognized as type: Android, now all my Pushes end up on state queued.
Is there something wrong with the 2.0.0-beta.0 ?
Is there any solution or fix?
I’m a big fan of Ionic as you know, but facing these challenges is something everyone hates and that scares everyone to use Ionic Push for Production. On my Blog I have about 130 comments only on Push notifications (see here), because nobody get’s this right…
The idea of Ionic.io and Push is great, but the feature should be a bit more reliable.
I am running into same issue over and over. I handle ionic push notifications in my 4 apps and its getting frustrating when it stop working without any reason. Ionic should streamline process to make it more clear to debug actual problem.
@gildebrand Thanks for the code. I actually got push notifications up and running using the new ionic.cloud setup tutorial. Before I was still using the web-platform. The new ionic docs on this seem much easier.