realtime database with ios and firebase

33

Upload: nscoder-mexico

Post on 14-Jan-2017

56 views

Category:

Technology


0 download

TRANSCRIPT

RealtimeDatabase

Authentication

Hosting

console.firebase.google.com

things that matters...

all datait's a JSON tree

NSStringNSNumberNSDictionaryNSArray

Data Types

let rootRef = FIRDatabase.database().reference()

/

CRUD

setValuechildByAutoIdupdateChildValuesrunTransactionBlock

Save Data

let rootRef = FIRDatabase.database().reference()let logRef = rootRef.child("log")let logKey = logRef.childByAutoId().key

let value = "Hello World"logRef.child(logKey).setValue(value)

/log/-KReb10DaQhFoLb7w7Oi: “Hello World”

FIRDataEventType.Value.ChildAdded.ChildChanged.ChildRemoved.ChildMoved

Retrieve Data

let rootRef = FIRDatabase.database().reference()let logRef = rootRef.child("log")

logRef.observeEventType(.Value, withBlock: { (snapshot) in // Funny Stuff print(snapshot) }, withCancelBlock: nil)

ok, let’s make the mostamazing demo...

A TO-DO LIST!

let’s go!

...

lets everyoneto join the fun!

bit.ly/pokefirebase

where to go from here?

firebase.google.com/docsyoutube.com/user/FirebaseLets Build That App

lmgtfy.com

lol

Gabo Lugo.@gabovanlugo

Thanks!