maui: Bitcode is deprecated when publishing app to appstore MAUI in 7.0.200-preview.22628.1
Description
I installed the latest version of VS code for Mac (7.0.200-preview.22628.1 with MAUI workload) and found out that this issue is still there. https://github.com/dotnet/maui/issues/10989
Steps to Reproduce
Use a framework containing bitcode
Link to public reproduction project repository
no
Version with bug
Unknown/Other (please specify)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
IOS
Did you find any workaround?
<PropertyGroup>
<!-- Properties used to strip bitcode from frameworks when using Visual Studio for Mac -->
<_StripBitcodeFromFrameworksMasterAfterTargets Condition="'$(OS)'=='Unix'">_ExpandNativeReferences</_StripBitcodeFromFrameworksMasterAfterTargets>
<_StripBitcodeFromFrameworksMasterDependsOnTargets Condition="'$(OS)'=='Unix'">_StripBitcodeFromFrameworksOnMac</_StripBitcodeFromFrameworksMasterDependsOnTargets>
<!-- Properties used to strip bitcode from frameworks when using Visual Studio for Windows -->
<_StripBitcodeFromFrameworksMasterAfterTargets Condition="'$(OS)'!='Unix'">_ComputeFrameworkFilesToPublish</_StripBitcodeFromFrameworksMasterAfterTargets>
<_StripBitcodeFromFrameworksMasterDependsOnTargets Condition="'$(OS)'!='Unix'">_StripBitcodeFromFrameworksOnWindows</_StripBitcodeFromFrameworksMasterDependsOnTargets>
</PropertyGroup>
<Target Name="_StripBitcodeFromFrameworksMasterTarget"
Condition="'$(_StripBitcodeFromFrameworksMasterDependsOnTargets)'!='' AND @(_FrameworkNativeReference->Count()) != 0"
AfterTargets="$(_StripBitcodeFromFrameworksMasterAfterTargets)"
DependsOnTargets="$(_StripBitcodeFromFrameworksMasterDependsOnTargets)" />
<Target Name="_StripBitcodeFromFrameworksOnMac"
Condition="('$(OutputType)'!='Library' OR '$(IsAppExtension)'=='True') AND '$(_SdkIsSimulator)'=='False'">
<!-- Find the bitcode_strip command -->
<Exec Command="xcrun -find bitcode_strip" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="_BitcodeStripCommand" />
</Exec>
<!-- Strip the bitcode from frameworks -->
<Exec Command="$(_BitcodeStripCommand) %(_FrameworkNativeReference.Identity) -r -o %(_FrameworkNativeReference.Identity)" />
</Target>
<Target Name="_StripBitcodeFromFrameworksOnWindows"
Condition="('$(OutputType)'!='Library' OR '$(IsAppExtension)'=='True') AND '$(_SdkIsSimulator)'=='False' AND '$(IsMacEnabled)'=='true'">
<!-- Strip the bitcode from frameworks -->
<Exec SessionId="$(BuildSessionId)"
Command=""%24(xcrun -find bitcode_strip)" %(_FrameworkNativeReference.Identity) -r -o %(_FrameworkNativeReference.Identity)" />
<CopyFileFromBuildServer
SessionId="$(BuildSessionId)"
File="%(_FrameworkNativeReference.Identity)"
TargetFile="%(_FrameworkNativeReference.Identity)" />
</Target>
This code helped me. the solution works. Maybe it should be added by default?
Relevant log output
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 5
- Comments: 45 (28 by maintainers)
Thanks for confirming!
@maonaoda please attach a binlog (https://github.com/xamarin/xamarin-macios/wiki/Diagnosis#binary-build-logs) file, which contains much more information that’s crucial in trying to diagnose this.