In Javascript, a call using firebase ref generates a random identifier. Then you can fill in the material below.
However, I cannot find a push in Swift. Should I generate random identifiers myself?
I think you are looking for childByAutoId() :
childByAutoId()
childByAutoId generates a new child location using a unique key and returns a FIRDatabaseReference to it. This is useful when children from a Firebase database database present a list of items.The unique key generated by childByAutoId: has a prefix with a timestamp created by the client, so that the resulting list will be chronologically sorted.Statement func childByAutoId() -> FIRDatabaseReference
childByAutoId generates a new child location using a unique key and returns a FIRDatabaseReference to it. This is useful when children from a Firebase database database present a list of items.
childByAutoId
The unique key generated by childByAutoId: has a prefix with a timestamp created by the client, so that the resulting list will be chronologically sorted.
Statement
func childByAutoId() -> FIRDatabaseReference
Also see: https://firebase.google.com/docs/database/ios/read-and-write#update_specific_fields
Source: https://habr.com/ru/post/1265589/More articles:Scanners and diagrams of tensor maps are duplicated - tensorflowVisual Studio 2017 pre-recording - node.jsVisual Studio 2017 failed to install multiple components - visual-studio-2017What makes my choice GLFW_SAMPLES? - graphicsTFS Build Agent failed to start Nuget Restore for: .Net Core + VS 2017 + private TFS Feed - visual-studio-2017Get country / city without geographic location React-native API? - react-nativeApache Spark Dataframe Groupby agg () for multiple columns - scalaBest way to call an API inside a loop using Promises - javascriptIs this an idiomatic workflow pool in Go? - multithreadingMonitoring pending asynchronous operations in a Node.js environment - javascriptAll Articles