You can store only 4 types of NSObjects mentioned in Firebase. But for the most part, data is just a row, and storing rows is easy.
Assuming your photoURL is the actual NSURL, you can save it as a string
let ref = myRootRef.childByAppendingPath("photo_urls")
let thisFileRef = ref.childByAutoId()
thisFileRef.setValue(photoURL.absoluteString)
NSURL
let url = NSURL(string: urlString)!
, , Firebase. ,
let usersRef = self.myRootRef.childByAppendingPath("users")
let thisUserRef = usersRef.childByAutoId()
var dict = [String: String]()
dict["displayName"] = "Bill"
dict["email"] = "bill@thing.com"
dict["gender"] = "male"
dict["photo_url"] = photoURL.absoluteString
thisUserRef.setValue(dict)
User,
let aUser = User()
aUser.initWithStuff(displayName, email, gender etc etc
aUser.createUser()
.
, auth.uid node. v3.x, 2.x, , , Firebase .