Closed awalker-dsg closed 5 months ago
Hmm. It's my understanding that bitcode is completely deprecated now, so maybe that target isn't needed at all? It seems your workaround is just to ignore it anyway.
It could be that bitcode is no longer needed. The suggested change was just an attempt to follow the developers' Hippocratic Oath -- do no harm, but if you do, try not to piss off too many people.
Although the workaround temporarily takes care of the issue, it's less than ideal to modify the .targets file after the package has been installed because those changes will be lost the next time we get an update of this library.
So, we would like to get an official release with this fix. What can I do to help make that happen? I could create a fork and implement the change myself, but that seems like overkill for a one-line code change in a .targets file. Also, since I've never contributed to this project before, I would need some help because I'm not sure what the process is for submitting and completing a PR.
If I am asked to implement this change, as I hinted at in my last post I would use the suggested change as-is rather than removing the bitcode target. That seems the safest approach because it doesn't appear the presence of the bitcode target is causing problems anywhere else except when building an iOS app on Windows with net8.
@awalker-dsg I disagree that the approach to disable the target on Windows is the safest approach. Stripping bitcode is either important, or it isn't. If it is important, then it should run regardless of the platform that is running the build.
This said, I'm pretty confident that this bitcode stripping targets are vestigial now. The Firebase iOS SDK release notes suggest that bitcode was removed in version 10, so I think we should be safe to just remove the targets.
I just published a package for Firebase.Core that removes these targets (10.24.0.1). Please give this package a try and report back!
@AdamEssenmacher, re "I disagree..." No problem -- you're the boss!
I retested with 10.24.0.1 and that has resolved the problem. Many, many, many thanks for taking care of this and for the quick turnaround!
Note: This error was originally reported as xamarin/GoogleApisForiOSComponents issue 646
We are getting the following error when using Visual Studio v17.9.6 to build an app for iOS when targeting .NET 8:
Steps to reproduce This MAUI test project was created using the VS wizard. It was modified so it only targets iOS, and a reference to AdamE.Firebase.iOS.Core v10.24.0 was added. Using that sample code, here are the steps to reproduce the issue.
The error seems to be caused by changes made to address MAUI issue 12863. The error can be traced to this block of code in the AdamE.Firebase.iOS.Core NuGet's \buildTransitive\AdamE.Firebase.iOS.Core.targets file:
We were able to work-around the issue by modifying the Target statement in the .targets file in our local NuGet repository to add
AND !$(TargetFramework.Contains('net8'))
to theCondition
as shown below to skip this target when the target framework is net8:After this change is made, the app builds successfully.