Firebase is not storing information in database

I set up a log in using the log in firebase auth tutorial and was working fine until recently I have noticed the nothing is being stored in the database anymore. The only thing I have changed really is linked the project with adMob and I gave project ownership to another account. I have determined that it is running through the code so I am not sure what is going on. Also, it is being saved to the authentication and the users are being created.

					let db = Firestore.firestore()
				db.collection(email).document("log-in").setData( ["firstname":firstName,  "lastname":lastName, "uid": result!.user.uid ]) { (error) in
					if error != nil {
						//show error message
						self.showError("Error recording name")

you need to test it out first by setting the rules on “test mode” (allows all read and writes) so you can be sure that it is not the rules that are blocking it, if it goes through then you probably need to modify your rules…

you might also need to change/update the GoogleService-Info.plist because it may be different because of the ownership that you mentioned

Yep it turned off test mode. Thanks

1 Like