Рет қаралды 21,487
In the last episode, we learned how to fetch data from Firestore in real-time. On today’s episode of Firebase Semi-live, Peter will demonstrate how we can use Cloud Firestore and Swift Codable API.
Chapters:
0:00 Intro
0:24 A closer look at our existing code
1:18 The Codable protocol
1:55 Adding the FirebaseFirestoreSwift pod
2:25 Making the model codable
3:10 Fine-tuning the data mapping
3:55 Mapping the document ID
5:05 Refactoring the view model
6:24 Demo
7:11 Using Codable when writing data to Firestore
8:55 One more thing...
9:33 Using Google's Open Source search engine to search Firebase's code base
10:21 A look at the @ServerTimestamp property wrapper
12:50 What is @ExplicitNull, and when should you use it?
13:45 Wrap-up
Resources:
Encoding and Decoding Custom Types → goo.gle/2T1Quic
Follow Peter’s blog → goo.gle/2Y114cK
Firestore server timestamps explained → goo.gle/2T6mfqr
Setting up Firebase for iOS → goo.gle/39xIIBZ
Cloud Firestore Intro → goo.gle/2ycqV6L
SwiftUI and Firebase playlist → goo.gle/3f9Uiav
Subscribe to Firebase → goo.gle/Firebase
#FirebaseSemiLive