Expected Behaviour
Send push notification to registered device token with this plugin for iOS (Android has no problem)
Actual Behaviour
I am always receiving {“reason”:”DeviceTokenNotForTopic”}
Reproduce Scenario (including but not limited to)
Everything seems to be OK in the client app. I ask me for permission to receive push notifications.
But when I try to send a push notification through APNs service from the server using the registered token over http, I am always receiving {"reason":"DeviceTokenNotForTopic"}
Steps to Reproduce
In iOS, I am trying to send push notification from commad line with this order:
curl -d '{"aps":{"alert":"[MESSAGE]","sound":"default"}}' --cert "[PATH TO APS CERTIFICATE.pem]":"" -H "apns-topic: [BUNDLE IDENTIFIER]" --http2 https://api.development.push.apple.co...
But I am always receiving this error:
{"reason":"DeviceTokenNotForTopic"}
In my config.xml I've used this bundle id
Sample Push Data Payload
'{"aps":{"alert":"Hi","sound":"default"}}'
Sample Code that illustrates the problem
curl -d '{"aps":{"alert":"Hi","sound":"default"}}' --cert "mycert.pem":"" -H "apns-topic: es.mypush.example" --http2 https://api.push.apple.com/3/device/b...
Logs taken while reproducing problem
{"reason":"DeviceTokenNotForTopic"}
Send push notification to registered device token with this plugin for iOS (Android has no problem)
Actual Behaviour
I am always receiving {“reason”:”DeviceTokenNotForTopic”}
Reproduce Scenario (including but not limited to)
Everything seems to be OK in the client app. I ask me for permission to receive push notifications.
But when I try to send a push notification through APNs service from the server using the registered token over http, I am always receiving {"reason":"DeviceTokenNotForTopic"}
Steps to Reproduce
In iOS, I am trying to send push notification from commad line with this order:
curl -d '{"aps":{"alert":"[MESSAGE]","sound":"default"}}' --cert "[PATH TO APS CERTIFICATE.pem]":"" -H "apns-topic: [BUNDLE IDENTIFIER]" --http2 https://api.development.push.apple.co...
But I am always receiving this error:
{"reason":"DeviceTokenNotForTopic"}
In my config.xml I've used this bundle id
Sample Push Data Payload
'{"aps":{"alert":"Hi","sound":"default"}}'
Sample Code that illustrates the problem
curl -d '{"aps":{"alert":"Hi","sound":"default"}}' --cert "mycert.pem":"" -H "apns-topic: es.mypush.example" --http2 https://api.push.apple.com/3/device/b...
Logs taken while reproducing problem
{"reason":"DeviceTokenNotForTopic"}
Be the first to post a reply!
