iOS Push notifications not showing when app is in background


#1

Hi guys!

I am having this issue, I am using phonegap-push-plugin to implement the push notifications. I am getting them with onNotification inside the app but if the app is in the background nothing is shown on the top of the device or in the block screen.

On Android there is no issue I am getting in app and outside the app the correct notification.

Can you help me with this.

ty!


#2

Did you double check to make sure developer mode is off (command line: ionic config set dev_push false)?


#3

I dont think the dev_push is the thing here because i am getting the notification on the device but not when in backgorund.


#4

Actually getting notifications only when the app is open is a common sign that dev mode is on, setting dev_push to false will set your push notifications to production mode and that should allow you do get push notifications on the device even when the app is closed.


#5

[quote=“gowen, post:2, topic:51203”]
Actually getting notifications only when the app is open is a common sign that dev mode is on, setting dev_push to false will set your push notifications to production mode and that should allow you do get push notifications on the device even when the app is closed.[/quote]

Will try then gowen, also for this i need to recreate the certificates for production no?

TY!


#6

Tried what you told me switched to production, now I am not getting neither inside the app notifications or background notifications :confused:

What changed was my token because now I have dev_push in false.

Any ideas, this is driving me mad :S

TY!


#7

I’m guessing your token changed to some long string instead of something starting with DEV and having dashes, that’s what they should look like so that’s fine.

Are you sure you’re using the right ionic api token for the push notification? Also have you set your app with apple developer so that it knows to allow push?

Take a look again at the full push docs and make sure you follow the security settings needed for apple and android as well as the ionic app key creation and certification. I had to do this a couple times before I got it right so wouldn’t surprise me if a step was missed somewhere.


#8

this is the error that the CURL sends back

{“meta”: {“status”: 401, “request_id”: “a7c1d34e-04dc-4a9e-b2d4-61642acfc3cd”, “version”: “2.0.0-beta.0”}, “error”: {“link”: null, “type”: “Unauthorized”, “message”: “JWT decode error occurred.”}}

I believe is a certificate related issue… don’t you?

ty!


#9

Looks like it, those guides should help you out then.

Good luck!


#10

ty gowen!

will try and post!


#11

Did you figure out what the issue was? I’m experiencing the same error.


#12

Has anyone got solution to this error??