Azure vs Firebase for iOS push notifications29 May 2016
I changed my mind :)
Azure expired my current subscription without telling me(!), so the notifications stopped working too.
I thought I’d have another go at moving over to Firebase for iOS, and I got it working pretty easily. I think the original problems were at my end, and to be fair to myself the documentation is much better now.
I’m much happier to be using just one service for notifications across both iOS and Android.
Azure as a platform was fine, but their customer service leaves a lot to be desired, so I’m not using it any more!
I wanted to add push notifications for my Yeltzland app, an interesting task which took longer than expected to complete.
What I wanted to do was to push notifications to the app during game time, which copies tweets from the club’s official account as notifications. This means I can get goal updates etc. without having to turn on notifications from the account in the main Twitter app (which can get a little tiresome!)
The server component part was pretty easy, as I already have a data feed of the team’s fixture list, so I knocked together a quick NodeJS script run in a corn job to use that plus the Twitter feed to generate the notifications.
However I didn’t want to build a full web app to manage user registrations myself just to do this, so it made sense to use an “off the shelf” notification hub instead.
Firebase seemed a good choice as a notification hub to try first, especially since at Google I/O they’d just done a major release to pull many disparate developer tools under the Firebase brand.
Firebase offers unlimited notifications, plus support for both Android and iOS, and it looked easy to set up.
In fact I did get it working pretty quickly, but during testing it seemed really unreliable. Notifications wouldn’t get delivered, or spasmodically, and I sepnt a couple of days trying to figure out what was going wrong without much success.
Now it could be that the iOS support has issues (my guess is the service has been mainly Android only before), or more likely I was doing something wrong, but in the end I gave up very frustrated.
I thought I’d give Azure a go instead, and it was really easy to setup a working Notification Hub without much effort at all.
Out of the box, the notifications seem much more reliable, and I’m really happy with the service so far.
I really wish I’d have started with Azure rather than wasting 2 days wrestling with Firebase.
One minor thing I did have to do was to have separate hubs for “sandbox” and “production” modes, which wasn’t clear from the Azure portal interface.
Your mileage may vary, but I found Azure a much more reliable notification hub for iOS and the client-side code was much simpler too.
I’d definitely recommend checking it out for small projects, although for heavy usage there is a cost involved compared to the unlimited free usage Firebase offers.