Problem building MAUI NET7 App using Plugin.Firebase
See original GitHub issueHello, 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
Issue Analytics
- State:
- Created 4 months ago
- Comments:8 (2 by maintainers)
Top GitHub Comments
Hello,
Has there been any news?
Installing just
Plugin.Firebase.CloudMessaging
didn’t solve the problem for me, either. Its dependency onXamarin.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
andobj
, 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 theXamarin.Firebase.iOS
side of things, I’m not even sure if there’s a way to work around this.