Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase push() in iOS

Tags:

ios

firebase

Is there any equivalent of Firebase.push() method for iOS API which is available in API for Javascript or Java ?

I couldn't find it in API reference for iOS.

What I need is to push data to the new child location based on timestamp (I prefer server not client timestamp) and return that reference in the block.

like image 679
webduvet Avatar asked Dec 04 '22 07:12

webduvet


1 Answers

Yes! We renamed it childByAutoId to be more consistent with iOS naming conventions, but it behaves the same as ref.push(). If you want to set data (equivalent of ref.push(data)), you can do [[ref childByAutoId] setValue:data]

like image 177
Michael Lehenbauer Avatar answered Dec 23 '22 10:12

Michael Lehenbauer