firebase-ios-sdk icon indicating copy to clipboard operation
firebase-ios-sdk copied to clipboard

[FR]: Disable warning [I-FST000002]: Attempting to initialize or set a @DocumentID property with a non-nil value

Open Meyssam120 opened this issue 9 months ago • 8 comments

Description

For many of my applications I use Structs, that I also use for Firebase (Codable), to feed Views in SwiftUI. For testing cases and other reasons, sometimes it is important for me to create static instances of those types e.g. unknown or placeholder. And to not trigger unexpected behavior I assign those static instances an ID, just to not break SwiftUI code. However every time those static instances are initialized, I get this warning in the console

11.8.1 - [FirebaseFirestore][I-FST000002] Attempting to initialize or set a @ DocumentID property with a non-nil value: "placeholder". The document ID is managed by Firestore and any initialized or set value will be ignored. The ID is automatically set when reading from Firestore.

I surely know about the stated behavior and would like to not get that warning all the time, since it is a large portion of my console logs.

API Proposal

I would appreciate a way to suppress those warnings either by an environment variable, Info.plist key or from within the code.

Firebase Product(s)

Firestore

Meyssam120 avatar Feb 20 '25 11:02 Meyssam120