Closed tranb3r closed 12 months ago
Ok, thanks for the info! Yeah, I guess it couldn't hurt to add this to the proguard configuration, so I'll do so for the next version.
@tranb3r could you please guide me on how to add that rule to a proguard file in .NET MAUI or a link with a guide? 🙏🏻 should I add a file to the root of the project or under /platforms/android/ folder? Which extension and build mode you set to the file?
I would like to enable R8 also on my Android app and I am getting the same error you faced.
I tried to look for .NET MAUI information but I only found for Xamarin.Forms.
Thanks in advance 🙂
@vhugogarcia
It's really easy to add a proguard configuration file to your app.
Proguard.cfg
file to your project, under /Platforms/Android/
ProguardConfiguration
Another way to do that is to edit your csproj:
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<ProguardConfiguration Include="Platforms\Android\Proguard.cfg" />
</ItemGroup>
@TobiasBuchholz Maybe we could try to fix this issue in the next release. It's simply consists in including a targets file in the Auth nuget. I see you don't use a nuspec file. Do you know how to include a targets file when using msbuild/csproj?
@TobiasBuchholz
The proguard rules have been updated in recent versions of Xamarin.Firebase.Auth
.
The issue will probably be resolved when updating the dependency from 121.0.8 to a more recevent version.
I've bumbed up Xamarin.Firebase.Auth
to the newest version and released it with Plugin.Firebase.Auth 2.0.5
or Plugin.Firebase 2.0.9
.
@tranb3r can you confirm this fixes the issue?
@TobiasBuchholz
Yes, it works. Thanks!
No need to add firebase-auth-api
proguard rules to the app anymore.
I'm having this exception when trying to sign in with firebase, if android R8 is enabled:
Here is how to enable android R8: add
<AndroidLinkTool>r8</AndroidLinkTool>
to csproj.I've managed to fix the issue by adding to my app a proguard configuration file with this rule :
-keep class com.google.android.gms.internal.firebase-auth-api.** { *; }
I think it would be useful to add this proguard rule to Plugin.Firebase nuget. What do you think ?