APNS for .Net
This took me forever to figure out but I finally pieced it all together from the minor clues people left. You need to download the certificate for the APPID that you register on the developer portal. That certificate must be converted into a P12 format to be used on Windows. These commands in UNIX finally did it for me:
Step 1 :
openssl x509 -in aps_developer_identity.cer -inform DER -outaps_developer_identity.pem -outform PEM}
Step 2 :
openssl pkcs12 -nocerts -out APSCertificates.pem -inAPSCertificates.p12
Step 3:
openssl pkcs12 -export -in aps_developer_identity.pem -outaps_developer_identity.p12 -inkey APSCertificates.pem
Then:
You will be prompted a few times for the password you used to export the certificate and private key in Keychain and prompted again for new passwords to re-encrypt it all, but in the end you will have the file aps_developer_identity.p12 which you need to move to windows, then import it into both the Personal and Trusted Root sections of certificate manager in MMC. Then in C# when you use MoonAPNS and call the PushNotification class you give it a path to that certificate. Also make sure to remove spaces from the device token.
.Net Code for APNS
https://github.com/Redth/APNS-Sharp
As far as I know, this technology is also used for programming applications that run in the cloud. That is why I am very glad to use the services https://grapeup.com/services/ because I know that they are of the highest quality and help me in my everyday work.
ReplyDelete