0

I have published an app, and am sure that am using distribution(ad hoc) push certificate and using Push Wizard on the server side for sending push notifications. Am getting the following error while I try to send the push :

Status: Sent, but found invalid token(s)

This thing worked while I created ad hoc builds.What could possibly be wrong?

basum
  • 319
  • 1
  • 3
  • 18

1 Answers1

0

Is your device id (Device Token) is correct?

TheTom
  • 298
  • 3
  • 15
  • sorry for the noobness, but how do I verify that on a released application? – basum Sep 26 '16 at 12:12
  • @basum you must be saving your Device Tokens on your server. Debug your app first and check the Device Token you get in 'didRegisterForRemoteNotifications'. Then when you are about to send a push notification from your server, debug your server to check against what Device Token you are sending the notification. Compare the two tokens to ensure that they are the same. – Shayan Jalil Sep 26 '16 at 12:16
  • Just check whether your application is fetching the correct Device Token or not, It doesn't need you published app, just debug it on the build you've published. – TheTom Sep 26 '16 at 12:17
  • No it is not, I am not getting the same device token (64 hex number) on server and client, but I am sure it worked before, what could have gone wrong? – basum Sep 26 '16 at 19:08
  • That the device ids were skewed was the problem, thanks for pointing out. Replacing the certificate on the server worked, but am not sure why it worked, since already I was using the same certificate on the server – basum Sep 26 '16 at 19:30