TobiasBuchholz / Plugin.Firebase

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

[2.0.0] Support net6.0 TFM #150

Closed tranb3r closed 1 year ago

tranb3r commented 1 year ago

Hi,

The 2.0.0 version of the plugin does not support net6.0 TFM. It only supports net6.0-android and net6.0-ios. This is not very convenient when one want to add the plugin to a pure net6.0 class library (used in an android/ios app), since it requires to modify the supported TFMs of the class library to make it an android/ios library, which should not be necessary.

Could you please add net6.0 TFM support to the nugets ?

Thanks !

vhugogarcia commented 1 year ago

I don't think that is possible and/or necessary. Because, it has platform specific code (I may be wrong). It works very good as it is now. Also, it will requiere to add additional code and it will lead to generate large file size.

tranb3r commented 1 year ago

@vhugogarcia Thank you for you comment, but you're wrong. First, it's possible. Of course it has platform specific code. But this does not prevent it from referencing it from a pure net6.0 project. Second, it's necessary. It's pretty much how every dotnet maui plugin is implemented. Including the previous version of this plugin. About file size, I honestly doubt it will make any visible difference, because the pure dotnet assembly is replaced by the platform specific version of the assembly when building the application, so in the end you have the same application code.

vhugogarcia commented 1 year ago

Thanks for the explanation @tranb3r . I keep learning new stuff everyday, and it makes sense now that I think of more in depth.

I believe it will also worth to upgrade to .NET 7 the projects, maybe? what do you think?

tranb3r commented 1 year ago

I believe it will also worth to upgrade to .NET 7 the projects, maybe? what do you think?

Why do you want to upgrade to net7? It's important to support net6 since it's LTS.

vhugogarcia commented 1 year ago

I believe it will also worth to upgrade to .NET 7 the projects, maybe? what do you think?

Why do you want to upgrade to net7?

It's important to support net6 since it's LTS.

If you think about it more in depth, on mobile world the .NET version is irrelevant if LTS or STS, because you must upgrade yes or yes due to an iOS and Android guidelines.

However, the benefit to upgrade is the performance on common .NET tasks like managing strings, lists, and platform improvements, etc.

Again, I may be wrong. I am just sharing my grain of salt.

TobiasBuchholz commented 1 year ago

I believe it will also worth to upgrade to .NET 7 the projects, maybe? what do you think?

Why do you want to upgrade to net7? It's important to support net6 since it's LTS.

I agree with that, so the plugin should stay at .net6 until it's really necessary to update to .net7.

The .net6.0 TFM was removed by accident and I don't think there is any harm in adding it back in, so I will do that for next version so people like @tranb3r can benefit from it :)

TobiasBuchholz commented 1 year ago

The new version 2.0.1 with .net6.0 TFM is published now.