TobiasBuchholz / Plugin.Firebase

Wrapper around the native Android and iOS Firebase Xamarin SDKs
MIT License
211 stars 49 forks source link

Firestore: nullable long property not bound on iOS #249

Closed SeriousM closed 8 months ago

SeriousM commented 8 months ago

Given is

[FirestoreData]
public class UserModel
{
  [FirestoreProperty("userId")]
  public long? UserId { get; set; }
}

version 1:

userId (number) = 123

or

version 2:

userId (null) = null

On Android the version 1 and 2 is binding very well onto the model, on iOS neither on version 1 or 2 a value is bound at all. When I change the property from long? UserId to long UserId the value is bound well.

I suspect that the NSObject-netObect mapping is a problem here and I guess there is no way to fix that, right?

Thank you very much for all your work!!

TobiasBuchholz commented 8 months ago

The PR #250 is contained in Plugin.Firestore 2.0.11 and Plugin.Firebase.Firestore 2.0.6 🚀