dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.99k stars 1.72k forks source link

xcrun -find bitcode_strip is running every time I deploy locally to an iPad #24552

Open dsancho opened 2 weeks ago

dsancho commented 2 weeks ago

Description

The problem is that every time I want to debug my application on the iPad, it takes like 30 minutes to run the command xcrun -find bitcode_strip for GoogleMobileAds library. The think is that this library already has been striped and running this command does nothing.

First time I can understand that it is needed to do this process for /XamarinBuildDownloadCache/FAdM-8.13.0/Frameworks/GoogleMobileAdsFramework-Current/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/GoogleMobileAds but the generated file can be used for subsequent compilations.

I asked GPT and answered to put this in my project

<_StripBitcodeFromFrameworksMasterDependsOnTargets Condition="'$(OS)'=='Windows_NT'">_StripBitcodeFromFrameworksOnWindows

BUT did not work.

Steps to Reproduce

  1. Create a new MAUI iOS project
  2. Add any package that references Xamarin.Google.iOS.MobileAds (8.13.0.3). For example, Plugin.MauiMTAdmob
  3. You need an Apple developer account, and the device added to a profile for this application.
  4. Try to debug in a connected device

Link to public reproduction project repository

No response

Version with bug

9.0.0-preview.7.24407.4

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

github-actions[bot] commented 2 weeks ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

dsancho commented 2 weeks ago

I have found a workaround that is to comment the following lines from Xamarin.Google.iOS.MobileAds.targets (in the nuget package folder)

<ItemGroup Condition="('$(OutputType)'!='Library' OR '$(IsAppExtension)'=='True')">
    <_FrameworkNamesToStripBitcode Include="GoogleMobileAds" />
  </ItemGroup>

but the ideal is that somehow, visual studio was able know that the file in the XamarinBuildDownloadCache has been already striped.

drasticactions commented 1 week ago

@rolfbjarne Would this be an SDK issue?

rolfbjarne commented 1 week ago

This is probably a bug in the Xamarin.Google.iOS.MobileAds NuGet, but if you could get an MSBuild binlog I should be able to confirm what's going on.

dsancho commented 1 week ago

This happens to other packages too. It will happen for any package that needs to be striped.

QianaJiao commented 1 week ago

Hi, @dsancho I noticed that you also debug to the local iOS device, and using xcframework resource, so it may be the same as https://github.com/dotnet/maui/issues/23829#issuecomment-2328504450

rolfbjarne commented 6 days ago

Hi, @dsancho I noticed that you also debug to the local iOS device, and using xcframework resource, so it may be the same as #23829 (comment)

No, it's not (xcframeworks work fine with Hot Restart, I've created a PR to update the documentation).

dotnet-policy-service[bot] commented 6 days ago

Hi @dsancho. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.