Wednesday, 14 October 2015

Testing Apple Push APNS

Today I've been trying to get some .net code working on a server using PushSharp to send messages via APNS. I've used this code before and it all works fine, and is still in production for a major app, running every ten minutes. For some reason my new cut of the code wasn't working, and I needed some way to work out whether something was wrong with this implementation or perhaps something was wrong with the Device Token I was sending to APNS.

Enter Pusher, an app that runs on your Mac and allows you to fire messages to devices from your desktop either via the sandbox or production server.

This proved to be very useful as within ten minutes I'd established that it was my device token at fault - it seems in that even in my dev environment running my app on my phone from Xcode I was interacting with the Production APNS system rather than the expected sandbox system, and so when sending we should have been using the production certificate.

No comments:

Post a Comment

Comments are moderated, so you'll have to wait a little bit before they appear!