You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added initialization of FIRDocumentReference for Codable
Introduction
When FIRDocumentReference conforms to Codable, initialization with Decodable is required.
However, because the initialization method is sealed, it can not conform well.
I understand why the initialization method is sealed. That is the proposal.
@interfaceFIRDocumentReference : NSObject/** :nodoc: */
- (instancetype)init
__attribute__((unavailable("FIRDocumentReference cannot be created directly.")));
Proposed solution
I propose adding an initialization method that receives a FIRDocumentReference.
Thanks for the feedback! We actually have an existing issue discussing Codable support for Firestore over here: #627 So if you have additional feedback, that would probably be the best place for it (or on the doc that @wilhuff has shared with you).
Note that DocumentReference is basically just a path to data and the actual Firestore data is stored in the DocumentSnapshot, and so we've been discussing Codable support in the context of DocumentSnapshot rather than DocumentReference.
Added initialization of FIRDocumentReference for Codable
Introduction
When FIRDocumentReference conforms to Codable, initialization with Decodable is required.
However, because the initialization method is sealed, it can not conform well.
I understand why the initialization method is sealed. That is the proposal.
Proposed solution
I propose adding an initialization method that receives a FIRDocumentReference.
Usage
The text was updated successfully, but these errors were encountered: