I'm currently learning the ropes of Firebase and iOS so please bear with me. I'm currently posting to my table called Posts
as shown here:
let postInfo = ["Description": txtPostDescription.text!, "ImageUrl": imgUrl, "Likes": 0]
var t = FIRDatabase.database().reference().child("Posts").childByAutoId().setValue(postInfo)
print(t)
I'm trying to retrieve the primary key
that gets created when I insert the new record, however I'm unable to retrieve it. I've tried childByAutoId()
(but that was a random guess due to browsing the web and not being able to find a solid solution). Any ideas?