Open kbahia07 opened 7 years ago
@kbahia07 apparently if one of your tokens is invalid the connection with APNS is broken, I just noticed it and am looking for a solution. Let me know if you were able to overcome this.
I think the function is working and below are what I found,
2.don't mix the development token and production token up in the array This is important. I found if all the tokens in the array are production token and I am using production certificate, APNS can handle that pretty good. APNS will return the expired tokens as invalid tokens and all other devices can receive the notification as normal. Then I just remove the invalid tokens from the db. V.v, it works fine if all tokens are development token and I am using the development cert. Things is not as expected when the tokens are mixed up in the array, this will lead to that notification will be stopped by APNS and no any error you can receive.
3.does it mean we cannot debug the notification under development env after the app is released? No, it doesn't. When I upload the token to the app server, I use a flag to mark if the token is a development one. You can tell if it's under debugging by ref to https://stackoverflow.com/questions/12464386/xcode-conditional-development-or-production-mode, When the server sends notification, it use development cert to send to msg to development devices and use the production cert to send to production devices.
how do l get the users device tokens and save them
@nanaaikinson24 the mobile app needs to actively send it over to your server. You can then store the device token against the user that sent it.
Been using the library for some time already, but suddenly, the iOS push notification does not work when I pass an array of device token. I've tried to pass a single token and worked. Also tried to pass an array of Android device token and worked as well.
Anyone experience the same problem? This issue just started last week. Thanks!