Codable class does not conform to protocol Decodable because of TimeStamp, new Error wasn’t there before
import Foundation import FirebaseAuth import Firebase struct Post: Identifiable, Hashable, Codable { let id: String let ownerUid: String let caption: String var likes: Int var rating: Double let location: String // required let category: String // restaurants, places, lodging let imageUrl: String let timestamp: Timestamp var user: User? var didLike: Bool? = false } This […]
Codable class does not conform to protocol Decodable because of TimeStamp, new Error wasn’t there before
import Foundation import FirebaseAuth import Firebase struct Post: Identifiable, Hashable, Codable { let id: String let ownerUid: String let caption: String var likes: Int var rating: Double let location: String // required let category: String // restaurants, places, lodging let imageUrl: String let timestamp: Timestamp var user: User? var didLike: Bool? = false } This […]
Codable class does not conform to protocol Decodable because of TimeStamp, new Error wasn’t there before
import Foundation import FirebaseAuth import Firebase struct Post: Identifiable, Hashable, Codable { let id: String let ownerUid: String let caption: String var likes: Int var rating: Double let location: String // required let category: String // restaurants, places, lodging let imageUrl: String let timestamp: Timestamp var user: User? var didLike: Bool? = false } This […]
How do I localise Firebase error messages in Swift?
I have been trying to localise the error messages presented when user information becomes an issue. In the code below, I tried to localise it to French but it simply didn’t work and the error just got printed in English.
Type-checking custom class when creating or updating Firestore
This is the current way i’m creating and updating data in Firestore.
Firebase realtime database — cannot convert snapshot.value to NSDictionary
I’m following the instructions from https://firebase.google.com/docs/database/ios/read-and-write to read a record from Firebase Realtime Database:
no output value of a function
I can’t get 3 values out of a function, I get an error message: