3

I'm trying to get some error-response from Apple. Thought it could be a nice way to check if the message was delivered to the actual dev_token. I read about it in the documentation, it says:

With this format, if APNs encounters an unintelligible command, it returns an error response before disconnecting.

source: Apple Documentation

The problem is: I only get an error-response, if the payload-size is invalid or missing, but I don't get the "invalid token" error, even though Apples Feedback-Service listet it as invalid. My Question:

Is the error-response only for getting information about the code-format/checking wheather the payload is valid etc.?

Any help would be much appreciated! Thanks

Kara
  • 6,115
  • 16
  • 50
  • 57
David Balan
  • 121
  • 3

1 Answers1

0

Are you using the real APNS service or the sandbox? My experience has been that the sandbox will accept anything, while the real service is more picky.

Addys
  • 2,461
  • 15
  • 24
  • 1
    I am using the production environment. I got the answer to my question. First of all: if the feedback-service reports tokens, they are not invalid, they just expired due to (in most cases) the fact that this user uninstalled your app. One should mark them as inactive and should delete them after a few (not too many) fail-deliveries. Secondly: The enhanced push-format allows you to get immediate error-response from apple. The reason why I did not get the invalid-token error was simply that there weren't any. I tested it with a few random devtokens but these seemed not to be invalid. – David Balan Jul 05 '12 at 16:03