问题
To send notifications to my adhoc app i selected previously Distribution APNS service. I got notifications successfully.
But now while creating certificate I’m in confusion which one to select in portal..
Selected (sandbox&Prodcution) and created .p12 file and uploaded to my sever.. But Im getting following error You have selected the Production server, yet your Certificate does not appear to be the Production certificate! Please check to ensure you have the correct certificate!
I figured out the Issue is due to PushSharp,
https://github.com/Redth/PushSharp/issues/585#issue
But unable to edit/Modify that code in that class.
Please help me
Thank you...
回答1:
For Development Notification: Select - "Apple Push Notification service SSL(SandBox)"
For Production/Distribution Notification: Select - "Apple Push Notification service SSL(SandBox & Production)"
回答2:
After Changing to following code in my server side
pushBroker.RegisterAppleService(new ApplePushChannelSettings(true, appleCertificate, password));
to
pushBroker.RegisterAppleService(new ApplePushChannelSettings(true, appleCertificate, password, true));
Changes: Added One more parameter to constructor to disable certificate check.
Now Im getting notifications for old/new certificates..
Thanks..
来源:https://stackoverflow.com/questions/34390486/apns-certificate-issue-while-sending-notification-to-ios-app