Reputation: 3
I am using PushSharp C# library to send apple push notification and almost from last one month I am getting following error to send notification.
Everything is complete to send a notification but from last month I am getting error like following, so please help me to solve this issue, and if any body is having any Idea then please tell me what is problem for sending notification.
PushSharp.Apple.ApplePushService -> PushSharp.Core.MaxSendAttemptsReachedException: The maximum number of Send attempts to send the notification was reached! -> {"aps":{"alert":"Test message","badge":1,"sound":"sound.caf"},"Type":0,"UserId":0}
Upvotes: 0
Views: 2724
Reputation: 31
You only use certificate in .p12 format to encode your message, then APN will identify who you are before accepting the push since the certificate was issued by them. With "multi selected export", you are including both cert/publich key and private key content and normally, the BEGIN PRIVATE RSA KEY is placed first. Then you will not be able to send. Br,
Upvotes: 1
Reputation: 11
The issue ended up being related to the export of the p12.
When exporting the p12 we multi selected to export public and private to generate the p12. When only exporting the public, the size of the p12 was 3217 bytes. The 3217 byte file worked.
If your p12 is 6140 bytes you'll need to regenerate it. I resolved this issue by regenerating the certificate. For more information take a look at this.
Upvotes: 1