ios - Firebase Snapshot iteration order -


when iterate through firebase snapshot sample code this:

var ref = firebase(url:my_firebase_url) ref.observesingleeventoftype(.value, withblock: { snapshot in     rest in snapshot.children.allobjects [fdatasnapshot] {        println(rest.value)          } }) 

is there way guarantee iteration in order of creation of children in node?

to guarantee order of children, use .childbyautoid when generating new child of firebase database location. reference states, key prefixed timestamp. frank says, can use queryorderedbykey specify specific order. since children timestamped, order order of creation.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -