X.Otano
X.Otano

Reputation: 2179

When a APNS token got expired ? iOS/ Push

I am facing a strange situation. I am testing a web app, aimed to send push notifications. It uses PushSharp nuget package.My test is based on sending a little bunch of push messages, to concrete devices. I know that, some of them don't have the app installed. There are some cases, that APNS doesn't answer with DeviceSubscriptionExpired, mostly whith the firsts attemps. After a while, it correctly starts to answer with the proper DeviceSubscriptionExpired

  1. How APNS works ?
  2. When it marks a device token as expired? In which situations?

Many thanks

Upvotes: 1

Views: 1093

Answers (1)

Anurag Kondeya
Anurag Kondeya

Reputation: 57

Apple notification service respond to your push request with status code https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html

Status code  Description
0            No errors encountered
1            Processing error
2            Missing device token
3            Missing topic
4            Missing payload
5            Invalid token size
6            Invalid topic size
7            Invalid payload size
8            Invalid token
10           Shutdown
255          None (unknown)

For an expired token it's possible return 8. The process is asynchronous, and it may take a while to get status feedback.

Upvotes: 0

Related Questions