xamarin / GoogleApisForiOSComponents

MIT License
225 stars 161 forks source link

MAUI Firebase iOS not building #640

Closed RR99Link closed 9 months ago

RR99Link commented 10 months ago

I am trying to implement and compile with Visual Studio 2022 in Windows 11 with push notifications in my MAUI application for both Android and iOS. I receive the following error when building: "Unable to copy file "D:\p\xamarin.firebase.ios.installations\8.10.0.3\lib\net6.0-ios15.4\Firebase.Installations.resources\FirebaseInstallations.xcframework\ios-arm64_x86_64-simulator\FirebaseInstallations.framework\Headers\FIRInstallationsErrors.h" to "bin\Debug\net8.0-ios\iossimulator-x64\Firebase.Installations.resources\FirebaseInstallations.xcframework\ios-arm64_x86_64-simulator\FirebaseInstallations.framework\Headers\FIRInstallationsErrors.h". Could not find a part of the path 'bin\Debug\net8.0-ios\iossimulator-x64\Firebase.Installations.resources\FirebaseInstallations.xcframework\ios-arm64_x86_64-simulator\FirebaseInstallations.framework\Headers\FIRInstallationsErrors.h'"

I have already a custom Nuget configuration with a minimal path (D:\p), enabled long paths in the registry and in the 'Local Group Policy Editor'.

Tried to implement Plugin.Firebase --> path too long Tried to implement Plugin.Firebase.CloudMessaging and Plugin.Firebase.Core --> can't build without errors because the path is too long

tuyen-vuduc commented 9 months ago

The same error happened here.

AlleSchonWeg commented 9 months ago

The minimal path for nuget is sometimes not enough. The build target:

bin\Debug\net8.0-ios\iossimulator-x64\Firebase.Installations.resources\FirebaseInstallations.xcframework\ios-arm64_x86_64-simulator\FirebaseInstallations.framework\Headers\

could also be to long. Try setting Build/Output/Base output path to C:\build\bin\ and Bese intermediate output path to C:\build\obj\

RR99Link commented 9 months ago

I resolved It with the paths: D:\b --> bin D:o --> obj D\p --> nuget packages

I forgot to close this discussion. Thanks also to AlleSchonWeg

IeuanWalker commented 9 months ago

639

Quaybe commented 7 months ago

I resolved It with the paths: D:\b --> bin D:o --> obj D\p --> nuget packages

I forgot to close this discussion. Thanks also to AlleSchonWeg

I was able to change bin to b and nuget to n, but how did you change the obj output? I can't find that anywwhere.

Also, so far these changes have not resolved my issue, which is the same as yours. :(

RR99Link commented 7 months ago

If you are using visual studio, you should add a file 'Directory.Build.props' in the same folder with the *.csproj. That file should be like the attachment. Screenshot 2024-03-01 092045

Quaybe commented 7 months ago

Thank you! That's a nifty trick. Unfortunately this isn't working for me either. Literally no solution works, the names are just too long.

I'm running .NET 8.0 in a .NET MAUI project. I'll have to resort to building everything via command line and doing a weird hack to publish my Android app at all due to the package signing also working incorrectly, which has nothing to do with this issue. Can't imagine the complications I'm going to run into once we finally start to publish the iOS side.

Thanks for the knowledge. Hope they fix this soon (they won't).