How do you create a field of type storage reference in the swift dictionary format using swift. I keep on getting an error saying that FIRStorageReference. Thank you in advance for your help. This is the code below, photoRef is a storage reference:
let newFirePhotoRef = newUserRef.collection("Photos").document()
photoRef = photoRef.child(newFirePhotoRef.documentID)
newFirePhotoRef.setData([
"Date":Date(),
"Photo Reference in Storage": photoRef
])
This is the error I receive:
Terminating app due to uncaught exception 'FIRInvalidArgumentException', reason: 'Unsupported type: FIRStorageReference (found in field Photo Reference in Storage
)'
I would like to create this field in swift