TobiasBuchholz / Plugin.Firebase

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

Update Target Frameworks #302

Closed DuncanMcPherson closed 5 months ago

DuncanMcPherson commented 5 months ago

I am experiencing an issue where, due to net6.0-android being out of support, nothing in the project can build receiving the following error:

The workload 'net6.0-android' is out of support and will not receive security updates in the future.

Playing around with the target frameworks in one of the projects located in the solution, I found that the minimum version needed to build out of the box is net7.0. I understand that there may be users that require net6.0, however when a framework reaches end of life, wouldn't it be best to update the targets for the plugin?

Note: I am totally willing to do this and submit a PR, I just wanted some input before I spent my time doing it.

AdamEssenmacher commented 5 months ago

Are you using the published nugets? Or referencing the projects directly?

DuncanMcPherson commented 5 months ago

In my personal projects, the published nugets. However there is a feature of firebase that I need in order to actually publish the app, and that feature doesn't exist in the plugin. I was going to write the feature myself and ran into that issue when trying to build.

AdamEssenmacher commented 5 months ago

Ok, I understand. We just had a discussion about this in #299

Building the solution is failing for you because you don't have the older framework/workloads installed and/or are using an incompatible version of MSBuild.

when a framework reaches end of life, wouldn't it be best to update the targets for the plugin?

MAUI's support policy is really aggressive. MAUI+.net7 is also out of support now, though I know some apps are still on it. We'd rather not leave them behind if we don't have to, so our default position is to publish these packages in a way that maximizes compatibility until we have a good reason otherwise.

There should be no harm in simply bumping the target framework locally or in a fork as you develop your feature.

Can I ask what feature you're looking to contribute?

DuncanMcPherson commented 5 months ago

I was looking to add AppCheck. I know how to do it on both platforms but would prefer not having to jump through complicated hoops in my apps just to implement it. For the time being, I will bump versions locally and revert them when I submit a PR

AdamEssenmacher commented 5 months ago

AppCheck would be an awesome contribution!

I know how to do it on both platforms

Microsoft never published a nuget package for AppCheck under Xamarin.Firebase.iOS.*, and there isn't one published under my fork/continuation yet (which this plugin now uses).

I would think we'd need to get one published as a prerequisite, no?

DuncanMcPherson commented 5 months ago

Yes, however in my research I did find a package by google that was written for iOS. But, if you are already working on one based off the xamarin packages, I would be willing to wait to implement this and leave my app without iOS for the time being.

AdamEssenmacher commented 5 months ago

I did find a package by google that was written for iOS

Do you have a link? I'm concerned that there would be native dependency conflicts.

DuncanMcPherson commented 5 months ago

My bad, I was reading quick and didn't notice that it was not designed for multi-platform apps. The nuget is this one: https://www.nuget.org/packages/Google.Apis.Firebaseappcheck.v1