I presented my experience building the app using Firebase and iOS to over 180 developers at four different mobile development Meetups:
- CocoaHeads Ottawa
- CocoaHeads Montreal
- Ottawa Mobile Development Meetup
- CocoaHeads Toronto (tacow)
CocoaHeads Toronto recorded the presentation and posted the video online. Here it is:
Google Firebase and iOS
Google Firebase is a Backend-as-a-Service (BaaS) available for iOS, Android and web applications. Google acquired Firebase in October of 2014 and now offers full support for the service.
A full library of well-documented APIs provide a rich set of features you can add to your app. In my talk at Toronto CocoaHeads, I covered how Firebase can be used for an iOS app.
Ideal Use Cases
Firebase is easy to set up and scale (compared to a custom backend service). I was able to set up the database, the media storage, and authentication services myself and use the Firebase APIs to post and get information.
The solution is ideal for early stage startups that want quick time to market, have limited financial resources, and have limited access to software development skills. It is also ideal for agencies and marketing teams that do not have ready access to iOS and backend developers to generate promotional or marketing apps.
The firebase database is a real-time NoSQL database structured in JSON format.
Setup is easy. When I developed my FotoLogger iOS app, I created the database in Firebase, entered dummy data and used the data to populate the TableView in one of the main View Controllers in my app. Once I had this working, I emptied the database of dummy data and then wrote the code to write data to the Firebase database from my app.
Besides reading and writing to the database, Firebase supports an API library to query the database realtime. I did not use this function in my app, but you could use it to search through your Firebase and present the results to your user. The alternative would be to do this locally in your app, but real-time access to the Firebase database means that you do not miss anything that might not be available locally in your app.
The most recent release of Firebase supports local store of media on the Firebase servers. Before this, you had to use another storage resource (such as AWS) to hold your media. This requires separate (and potentially messy) API calls. With this new Firebase release, you can now store media with Google Firebase.
The Firebase database and storage are separate and require different API calls.
Firebase provides a robust set of authentication services for your app. I used Facebook, Twitter and email login for the FotoLogger app. You can also use Google + and GitHub.
Firebase also offers an additional set of login services such as password reset and forgot password.
Additional Firebase Services
The additional services provided by Firebase include analytics, crash reporting, testing (for Android only), notifications, dynamic links and AdMob. I did not use these services in my app (with the exception of the analytics which comes free and requires no configuration).
Google continues to invest resources into Firebase and build out it’s functionality. Although it might not be the ideal backend for every application, it something you should consider the next time you start a new project.
This article is part of my iOS Development guide.