Apologies
You must be signed in to watch this lesson.
Save Settings to Firestore
Tinder Firestore Swipe and Match
Now whenever a user modifies their settings, we'll have to allow them to perform a save operation. This should safely persist the new changes into Firestore so that we can retrieve this information again. Doing this using a JSONEncoder will help us save a lot of headache of manually creating dictionaries. Let's see how the Encodable protocol works in today's lesson.

Comments (4)
ravikanth.marri@gmail.com
5 years ago
Hi Brian, Why do not we have ViewModel and reactive programming for Setting screen ? Is it for simplicity of teaching you chose to do directly ? My question is how do you know whether to have a ViewModel or not ?
David Guarino
4 years ago
There could've been one here, User Details page, and message/ matches as well. This course could definitely be expanded for more features like he did for his App Store Course (ex: more MVVM, functionality of idle buttons etc..) ....he could give users a chance to purchase this course that haven't before he increased the price. I know he's going to read this, so it would be a suggestion when he does!
haruo
5 years ago
Hi Brian, thank you for always! Now I got one error, and I searched on google. But I could not find how to solve the following error... Do you know??? ====================== Undefined symbols for architecture arm64: "_GULResetLogger", referenced from: _FIRResetLogger in FirebaseCore(FIRLogger.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) :-1: linker command failed with exit code 1 (use -v to see invocation) ========================================
Brian Voong
5 years ago
haruo
5 years ago
Yes!
haruo
5 years ago
I compiled for my iPhoneSE.
Brian Voong
5 years ago
haruo
5 years ago
Thank you for your reply, Mr.Brian. I don't know, but now I can compile for iPhoneSE... And I'm also able to compile against a newer device! I don't know what exactly is the issue. But thank you for Brian! I will keep learning by your material!
haruo
5 years ago
Thank you for your reply, Mr.Brian. I don't know, but now I can compile for iPhoneSE... And I'm also able to compile against a newer device! I don't know what exactly is the issue. But thank you for Brian! I will keep learning by your material!
Thanh Minh
3 years ago
nobody got same error except you :)
Eugeneberezin
4 years ago
Hey hey! Thank you for an awesome lesson. I went a bit further and added HUD in case we got an error for saving user: if let err = err { print(">>FAILED TO SAVE<<", err) hud.textLabel.text = err.localizedDescription hud.show(in: self.view) hud.dismiss(afterDelay: 5, animated: true) return }
Eugeneberezin
4 years ago
Caught an error. if let err = err { print(">>FAILED TO SAVE<<", err) hud.textLabel.text = "Failed to save data" hud.detailTextLabel.text = err.localizedDescription hud.show(in: self.view) hud.dismiss(afterDelay: 5, animated: true) return }
Thanh Minh
3 years ago
We can set tag for the textfields (textfield.tag) then switch(tag) for more clean code.
HELP & SUPPORT