0

I'm totally stuck, please help.

I have two devices for testing. When i build and run app with xcode on this devices i got two device tokens which i successfully used to send notifications through sandbox server.

When i tried to test production certificate with Ad Hoc provisioning profile(i uploaded build on TestFlight), i had two NEW tokens which i also successfully used to send notifications through release server.

BUT! If i have, for example, 4 tokens, 2 of which is for dev provisioning profile and 2 for Ad Hoc and send first using dev tokens and THEN Ad Hoc tokens through release server notifications don't appear...

Even if i have 1 token dev token and many Ad Hoc tokens, notifications which were sent after this 1 dev token is not appear.

Is this how APNS work or i've missed something?

Also sorry for my english!

Oleg_Korchickiy
  • 298
  • 5
  • 15

1 Answers1

1

You can't mix production tokens and sandbox tokens. The former only work with production certificate when connecting to production APNS server, and the latter only work with sandbox certificate when connecting to sandbox APNS server.

Sending a token to the wrong APNS server would close the connection and any following messages will be discarded.

Eran
  • 387,369
  • 54
  • 702
  • 768
  • Can you please provide a link for APNS docs which explains that it would close the connection if we send with a wrong token? I didn't find anything regarding this. Does this still apply to the new, uniformed APNS services? Thank you in advance. – Attila Bicskó May 04 '16 at 21:11