One-time push from dashboard returning error


#1

I followed the directions on Push from Scratch and successfully ran ionic emulate ios to launch the test app. I added alert(token.token); to the push.register function so that I could see the dev token. I think went to my app on https://apps.ionic.io and tried a one-time push notification. I selected the ‘development’ and ‘device tokens’ as my certificate and delivery mode, respectively. I added a title and message. I then entered the device token that was alerted in the emulator. I was expecting a push notification to show up on the emulator. Instead I got an error.

What returned was this:

{"result":"queued","message_id":"fe063d48cacd11e5bb25f6a24fd90554","errors":[]}

When I input the message id into the ‘Check Message Status’ input on the one-time notification dashboard, this is the info I get back:

{"android":{"failure_reason":"","sent":0,"success":false},"app_id":"d2bb004b","ios":{"failure_reason":"","sent":0,"success":false},"errors":[],"status":"Queued"}

I also tried a curl but it returned ‘Bad Request’. Here was my command in the Terminal (I’m leaving in real info because this is just a dummy app):

curl -u 5b777cf2a004673dd84a2210248513813cbb76b7d330c50b: -H "Content-Type: application/json" -H "X-Ionic-Application-Id: com.ionicframework.taggit577470
 " https://push.ionic.io/api/v1/push -d '{"tokens": ["DEV-449fdbd7-e19d-435a-b329-96b3852a04e4
 "],"notification":{"alert":"Hello world."}}'

I triple checked the token, so I know it’s right.

The dashboard does say “APNS push certificate” is required to use the features on the page, but the docs make it seem that you can bypass setting up anything on your Apple Developer account and just use Ionic Push dev mode to test against the API. Am I misunderstanding that?

Suggestions on what the problem might be?


#2

Same problem here ! any solutions ?


#3

I abandoned the Ionic Push service. I decided to use Node/Express to build my own server integration with APNS. Here’s an example tutorial: https://www.airpair.com/ionic-framework/posts/push-notifications-using-ionic-framework