I got device tokens in my DB and I am trying to check if particular device token is for sandbox mode or for production mode.
Thanks.
I got device tokens in my DB and I am trying to check if particular device token is for sandbox mode or for production mode.
Thanks.
You should try to send a notification with that device token to the sandbox APNS server (using the sandbox push certificate). Then you should try to read from the socket. If you read an error response with error code 8, that means the device token is invalid in the sandbox env (which means it's probably a production token).