Reputation: 195
Before firebase improvements I could post timestamps in any struct like
let usermsg = ["CreatedAt":FirebaseServerValue.timestamp(), "ChatTitle":msg.ChatTitle,"ChatBody":msg.ChatBody, "Owner":self.GoogleUserID]
But after FIRServerValue.timestamp()
became ( NSDictionary *
) I could not get timestamp to post as a value to the database.
Upvotes: 2
Views: 979
Reputation: 170
Try ["CreatedAt": [".sv": "timestamp"]...]
The saved value for that key must be something like: 1464103942351
Upvotes: 2