Open napcat opened 7 years ago
If we look at the code in this file: https://github.com/Redth/PushSharp/blob/master/PushSharp.Apple/ApnsConfiguration.cs, we can see that the error message you are receiving is generated because the certificate name has a certain word in it.
It is possible that the certificate file actually being used is wrong... but I have found that the certificate name (which is not something I think we have control over? - I think it's generated along with the certificate) can have some keywords in it that indicate it is a sandbox certificate, even though it is a production certificate.
You can disable the above check by passing false to the final parameter (validateIsApnsCertificate) when you call the ApnsConfiguration constructor. This might help :)
@ninjawithkillmoon - this fixed it for me as well. Make sure to also check this out if you are having problems with the cert:
What version of PushSharp are you using?
4.0.10
Describe your issue:
I can send push notifications to Android, but when I'm trying to send push notifications to ios, an error occurs:
I already created a certificate "Apple Push Notification service SSL (Sandbox & Production)" and also the individuals certificates "iOS App Development" and "App Store and Ad Hoc". In both cases I get the same error.
Is there any correct way to generate the certificate?
Can you point me the correct way, or is there any other bug or missing update?
Thank you, for your time.