>iAlertU v0.74 Released
>OK, so as I’ve said previously, version 1.1 of uAlertMe added support for Push Notifications. All it needed was for iAlertU on the Mac to send them
Last night I released v0.74 of iAlertU which adds the required functionality for all of this to work.
Getting all this to happen was actually not all that hard; Apple have made it fairly easy for us.
Originally, iAlertU was going to act as the actual provider, connecting to Apple’s APNs directly. I had the whole thing working, with the entire push notification provider written in Objective-c.
The only problem was that doing it this way meant including my private certificate for the SSL connection to Apple in the iAlertU bundle. This as my conscious and several helpful souls pointed out was a great way to ask for trouble if someone decided to misuse that certificate (although I had gone to some lengths to make this harder).
So, the next step was to add to the pkclSoft web server a provider that iAlertU could then interface with. This all looked too easy as there is a great package called easyapns that does just this, and it would have worked fine except for one thing. My web host blocks outgoing connections on the ports that Apple use for connections to their servers.
This effectively killed my ability to use easyapns which was a shame, but there were other options in the form of Push service providers.
The first I looked at was UrbanAirship. They looked great, but there is a potential cost as only the first million pushes per month are free. Although I thought it unlikely that the users of iAlertU would end up using more than this, I didn’t want to take the risk; after all I get nothing for my time on iAlertU, and uAlertMe doesn’t do well enough to pay any bills.
So I looked for another alternative, and found Xtify who offer a straight out free service to developers. I then set out to spend the next couple of days getting iAlertU to talk to Xtify, but found that whilst their service was great, and the customer support was excellent, being able to send a notification payload that could be localised by uAlertMe so that the notification can be displayed in the appropriate language was too hard. Basically, Xtify get you to send a payload in their format that is then translated into Apple’s format. This just wouldn’t work.
Back to UrbanAirship for me. Whilst they do something similar (so that you can send a single push to both iOS and Android devices) to Xtify, their interface is much more natural, better documented, and supported by packages of code that are easily obtainable via their website.
What about that cost-risk? We’ll I’ve decided to test the waters so-to-speak. I figure that with only a few thousand users out there, and that normally, the only time the push will happen is when the alarm goes off, people would have to be triggering their alarms hundreds of times per month. Given what iAlertU is, I don’t see this as likely.
We’ll see I guess. I’ve read blogs where people have bemoaned the cost of push notifications. If there does turn out to be a cost, then I’ll revisit how it’s done.
I hope to get my original objective-c push provider into somewhere like github soonish. Let me know if this is of interest.
For now, I’ll keep an eye on UrbanAirship, and hope that everyone finds the new functionality helpful.