question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem building MAUI NET7 App using Plugin.Firebase

See original GitHub issue

Hello, I am working to a MAUI App based on .NET7. Push notification works greatly on Android, but on iOS I’m receiving a lot of errors that avoid to complete the build if the plugin is installed.

I am working at this project with other developers, that have the same problems. I tried to solve it using 3 differents versions of Visual Studio (17.5.5, 17.6 and 17.7 preview) but the error persist.

I have 29 errors, all related to “xamarin.firebase.ios.XXX”, except one that is related to “xamarin.google.ios.signin”. Here a couple of them:

Errore	MT7091	Il file 'C:/Users/Fabio/.nuget/packages/xamarin.google.ios.signin/5.0.2.4/lib/net6.0-ios15.4/Google.SignIn.resources/GTMAppAuth.xcframework/ios-arm64_x86_64-simulator/GTMAppAuth.framework/GTMAppAuth' non è un framework valido: Unable to read beyond the end of the stream.	APP_ENERCOM_3	C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.7060\targets\Xamarin.Shared.Sdk.targets	672	
Errore	MT7091	Il file 'C:/Users/Fabio/.nuget/packages/xamarin.firebase.ios.storage/8.10.0.3/lib/net6.0-ios15.4/Firebase.Storage.resources/FirebaseStorage.xcframework/ios-arm64_x86_64-simulator/FirebaseStorage.framework/FirebaseStorage' non è un framework valido: Unable to read beyond the end of the stream.	APP_ENERCOM_3	C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.7060\targets\Xamarin.Shared.Sdk.targets	672	

I think it could be related to the version of packages used from the plugin itself, that requires different versions of some dependecies of my project. I noticed that effectively the plugin.firebase targets .NET6.0 and not .NET7. I tried to download the source and upgrade the plugins used internally, like Xamarin.firebase.messaging or Xamarin.GooglePlayServices.Auth, but I can’t complete it because the newest versions are incompatible with the project:

(NU1202	Package Xamarin.Firebase.Analytics 121.2.2 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package Xamarin.Firebase.Analytics 121.2.2 supports:
  - monoandroid12.0 (MonoAndroid,Version=v12.0)
  - net6.0-android31.0 (.NETCoreApp,Version=v6.0)

I attach here below a screnshot of the errors.

How can we solve the problem? At this time seems to be impossible to use the plugin in a MAUI app based on NET7 that targets iOS

error_updating_plugin

Issue Analytics

  • State:open
  • Created 4 months ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
JamesSoniccommented, Jul 19, 2023

Hello,

Has there been any news?

0reactions
sfysicommented, Jul 28, 2023

Installing just Plugin.Firebase.CloudMessaging didn’t solve the problem for me, either. Its dependency on Xamarin.Firebase.iOS.CloudMessaging seems to be the issue; even just installing that package gives me the same error: Could not copy the file “C:\Users\Me.nuget\packages\xamarin.firebase.ios.installations\8.10.0.3\lib.…\something.h” because it was not found.

The files it claims are missing are different every time I try rebuilding and changing the packages installed, but every time I check in the directory and confirm that those files do in fact exist. Deleting bin and obj, clearing out the .nuget/packages folder entirely, cleaning the project, restarting and updating Visual Studio… none of that helped. The package works fine in .NET 6, but as soon as the project switches to .NET 7, it all breaks down. Since the dependency is specifically on the Xamarin.Firebase.iOS side of things, I’m not even sure if there’s a way to work around this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

.NET MAUI + Firebase (Endless Problems) : r/dotnetMAUI
NET MAUI 7 I am having nothing but issues. All the articles I've found utilize Plugin.Firebase which doesn't seem to actually work with...
Read more >
Failed to create release build in iOS due to bitcode issue ...
Failed to create release build in iOS due to bitcode issue of Plugin.Firebase in .net MAUI having dotnet 7. Priya Baghel 1 Reputation...
Read more >
Plugin.Firebase causes Invalid Binary in a MAUI release ...
I am facing an Invalid Binary issue with the release build in the App Store. I have an empty sample MAUI app with...
Read more >
Sands of MAUI: Issue #72
The first step is to install the Plugin.Firebase NuGet package in a .NET MAUI app project. It is good to know that the...
Read more >
Firebase Push Notifications in .NET MAUI (Android)
In this post, you'll learn how to implement push notifications in your .NET MAUI Android application using Firebase.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found