Building apps? Firebase is all you need.

Giuseppe Travasoni
2 min readNov 18, 2015

As a 4 year iOS developer i’ve tested many frameworks, libraries, snippets and all of his friends. Every time I discover a new one, I try to imagine an application to play with.

Some weeks ago, during new tvOS beta testing, i was really surprised about how terrible is the text input system with Apple TV Remote, and I was very happy about YouTube and AirBNB login system.
Basically the TV gives you a code, you have to write this code somewhere on your phone/internet page and magically your logged in. Cool right?
Ok, let’s try somehow to to this with an App of mine, but how?

Thinking about “how”, I’ve closed this project for a while inside my “one-day-i’ll-do-it” box until I discovered Firebase.com.
What’s Firebase? It’s really simple: online JSON database, real time synchronized with super-simple SDK (available for Android, iOS, JavaScript and with REST API).
So basically you don’t have to do nothing using Firebase SDK except to initialize it. Stop. Now you have access to a JSON local/remote database. You don’t have to care about anything, only to write and read datas from you Firebase variable.

Let’s talk about how to implement it in swift.

Initialize:
var firebase = Firebase(url:YOUR-APP-URL)
Really, that’s all you have to do.

Write:
firebase.updateChildValues(YOUR-NSDICTIONARY)

Read:
var firebaseChild = firebase.childByAppendingPath(SOMETHING/SOMETHING)
firebaseChild.value

Read with async block:
firebase.observeEventType(EVENT-TYPE, withBlock: { (SNAPSHOT) -< Void in
})
Where snapshot is a real snapshot of changes occurried on online db.

So, in conclusion: what are planning to develop today with firebase?

--

--

Giuseppe Travasoni

Co-Founder at TrueScreen // Co-Founder at Beatcode // iOS Developer and Architect