Closed mwkirk closed 11 years ago
From sype...@gmail.com on November 01, 2011 15:18:40 Are you using a different token when pushing to the production server? You cannot use the same token, as documented in the wiki and by Apple.
If you are using a token made especially for the production server and your notification is still generating an Invalid Token error, please provide more details including full log output, the code you are running for the development server and the one for the production server, and any stack traces you get (if any).
From dux.dee...@gmail.com on November 02, 2011 06:45:32 I am using the same token - and I have been getting notifications with the same token until now (using 1.6). Can you please provide the link to wiki/docs where using 2 different tokens has been mentioned...
Thanks.
From sype...@gmail.com on November 02, 2011 14:12:37 Please refer to the very last paragraph of the "The Binary Interface and Notification Formats" section in Apple's APNS documentation:
«Take note that the device token in the production environment and the device token in the development (sandbox) environment are not the same value.»
I have no idea why your token might have worked before (maybe Apple didn't validate token/server relationships at the time you tried), but according to the documentation, you should be generating and using a different token for the production server. Since you are not using the same certificate for both servers anyway, this makes sense to have two tokens also. Is your production app generating the same token as your development app??
Please let us know here if it works with a token generated by your production app.
From dux.dee...@gmail.com on November 04, 2011 13:12:11 Thanks for the link - I was wrong in using the same device token. Problem solved !
Thanks :)
From sunbi...@gmail.com on November 07, 2011 01:04:01 hi
I have same trouble
but I don't solved device token
Device Token is different (development server , product server)
what's javapns's API by multi device (several device token) ?
please another comment~!!
From sype...@gmail.com on November 07, 2011 01:29:57 Please provide more details, including:
Original author: dux.dee...@gmail.com (November 01, 2011 12:03:39)
I am able to push using developer profile, but distribution version is not working. I get an error : APNS: [1] Invalid token
Strangely, I am able to push to the same app (on distribution profile) using javapns1.6 ! The problem seems only with javapns2 and distribution environment, as I am able to send the push message using developer profile. Has anyone tested this scenario ?
Thanks !
Original issue: http://code.google.com/p/javapns/issues/detail?id=77