TobiasBuchholz / Plugin.Firebase

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

Support int properties on IFirestoreObjects on Android #247

Closed AdamEssenmacher closed 8 months ago

AdamEssenmacher commented 8 months ago

This PR allows int or int? property types on IFirestoreObject on Android.

Currently, the Firestore plugin has inconsistent behavior between iOS and Android when setting up an IFirestoreObject with an int FirestoreProperty. The iOS implementation allows this, but the Android implementation will throw an exception.

It should be noted that Firestore itself only supports 64-bit integers, but I think the plugin should still let developers use 32-bit integers on their models if they want and deal with potential overflow exceptions.

At the very least, we should strive to keep the implementations behaving consistently across platforms.