iosxamarinvisual-studio-2022google-mobile-ads

GoogleAppMeasurement.xcframework has an incorrect or unknown format and cannot be processed


I really don't know if this is specific to the package or to xcframework or to the setup. In my case I just:

C:\Users\Admin\AppData\Local\XamarinBuildDownloadCache\GAppM-8.9.1\GoogleAppMeasurement-8.9.1\Frameworks\GoogleAppMeasurement.xcframework has an incorrect or unknown format and cannot be processed.

I've been using google ads in iOS projects for 10 years, updates tend to screw everything up, but it's usually fixable, this time I'm completely stuck.

I tried filing a bug report (https://developercommunity.visualstudio.com/t/GoogleAppMeasurementxcframework-has-an/10153891?entry=problem) and an issue on github (https://github.com/xamarin/GoogleApisForiOSComponents/issues/573) , but experience tells me it's useless...

[EDIT] The project is here: http://www.andreasabbatini.org/Files/AdmobTest.zip


Solution

  • Answering my own question:

    I “think” I have found a solution, if not the cause. I cannot replicate it relably, but sometimes it happens sometimes not.

    (in a brand new PC or VS install) 1-Create a project similar to that one. Add the Google Ads NuGet package. Build. The build works

    2-Create another project (or use that one, it’s the same). Add the same Google Ads NuGet package, then the Xamarin.Facebook.AudienceNetwork.iOS 6.9.0.1 https://github.com/xamarin/FacebookComponents/tree/main/Facebook.iOS/source/AudienceNetwork build this or the other project, for some strange reason, the above error starts to appear

    3-remove the above facebook package, the error is still there. I’ve tried many things here, readding packages, etc none work

    4-remove the packages, delete manually C:\Users\Admin\AppData\Local\XamarinBuildDownloadCache and readd the packages one at a time. Most of the time it works, but sometimes I have to repeat this step.