Reputation: 8584
I know for the web Firebase API there is a .push()
option that will guarantee the entries will be in the order they were inserted into your database. However, using Swift the only way to add data is to use the .set()
and .updateChildValues()
methods.
Is there anything like the .push()
for Swift where I can make sure my data appears in the order it was inserted?
Upvotes: 1
Views: 1715
Reputation: 598740
In iOS the method to generate such unique keys is called childByAutoId()
.
See the Firebase documentation on adding an item to a list.
Upvotes: 7