-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bitcode is deprecated when publishing app to appstore MAUI in 7.0.200-preview.22628.1 #12863
Comments
@SotoiGhost thoughts? |
Hi @KSemenenko! 👋🏼 Thank you for your time in reporting this issue. I think this is a question for the iOS team. The workaround seems harmless, but not sure if this could cause any harm later as this is directly modifying the framework saved on the disk. @dalexsoto, @rolfbjarne, thoughts on this? P.S: Regardless of whether this is added, it is best to report the affected framework to its owner so they can fix this from the root. |
I'm currently doing native binding for agora, they have xcframework. I have this issue when I send the binary to TestFlight. Also, the experience with bindings in general is not very smooth. It turned out that sln with the bindings library can't be next to maui project. It should be a separate project. I'm still working on it, but if you need any feedback, I'll be happy to help =) |
@KSemenenko you can verify if a framework has bitcode or has the bitcode marker flag enabled by running the following command: # Replace the path
otool -l path/to/your/Foo.xcframework/ios-arm64/Foo.framework/Foo | grep __LLVM -1 The command should not throw anything if there's no bitcode, otherwise will throw you something like this: cmdsize 152
segname __LLVM
vmaddr 0x000000000006c000
--
sectname __bundle
segname __LLVM
addr 0x000000000006c000 Hope this helps you! |
Thanks for your advice, I think now that my sdk is swift. Will try this one |
one more questions, https://swiftpackageindex.com/AgoraIO/AgoraRtcEngine_iOS |
Yes, we know it's not very smooth, we have known issues we're working on in this area.
Yes, the workaround seems harmless, but I'm hesitant to add code on our side for this, because:
|
@rolfbjarne thanks for answers! Well, in fact, for me it is the documentation that is the most difficult. I do not understand the clear steps to be taken. I'm C# developer and have no idea aboout swift and xcode. So far I have realized that I have to make another library which will be a wrapper for the sdk (and this makes a lot of sense) But I'm optimistic and determined to do it =) |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
I think this should be a build task enabled via a flag |
@SotoiGhost I have tried above code lines but show the following error The command "/Users/apple/Downloads/Xcode 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip /Users/apple/.nuget/packages/harfbuzzsharp.nativeassets.ios/2.8.2.3/runtimes/ios/native/libHarfBuzzSharp.framework/libHarfBuzzSharp -r -o /Users/apple/.nuget/packages/harfbuzzsharp.nativeassets.ios/2.8.2.3/runtimes/ios/native/libHarfBuzzSharp.framework/libHarfBuzzSharp" exited with code 127. (MSB3073) Please provide me a appropriate solution |
I have used the above code snippet but it shows an error follows how to resolve it The command "/Users/apple/Downloads/Xcode 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip /Users/apple/.nuget/packages/harfbuzzsharp.nativeassets.ios/2.8.2.3/runtimes/ios/native/libHarfBuzzSharp.framework/libHarfBuzzSharp -r -o /Users/apple/.nuget/packages/harfbuzzsharp.nativeassets.ios/2.8.2.3/runtimes/ios/native/libHarfBuzzSharp.framework/libHarfBuzzSharp" exited with code 127. (MSB3073) Please provide me a appropriate solution |
@vplife1 please attach a binlog (https://aka.ms/binlog) that shows the error. |
@rolfbjarne and @Eilon and @SotoiGhost I am facing issue when try to add my app on app store it throws the following iisues ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/FBLPromises.framework/FBLPromises' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/FirebaseCore.framework/FirebaseCore' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/FirebaseInstallations.framework/FirebaseInstallations' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/FirebaseMessaging.framework/FirebaseMessaging' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/GoogleAPIClientForREST.framework/GoogleAPIClientForREST' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/GoogleToolboxForMac.framework/GoogleToolboxForMac' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/GoogleUtilities.framework/GoogleUtilities' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/Protobuf.framework/Protobuf' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/leveldb.framework/leveldb' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/nanopb.framework/nanopb' contains bitcode. Please suggest me a correct way how to resolve this issue , I am not able to add my app on app store test flight |
what
|
@rolfbjarne please check binlogs Still, I am facing the same issue reply to me ASAP. It's very needful |
@maonaoda Are you facing the same issue ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/FBLPromises.framework/FBLPromises' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/FirebaseCore.framework/FirebaseCore' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/FirebaseInstallations.framework/FirebaseInstallations' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/FirebaseMessaging.framework/FirebaseMessaging' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/GoogleAPIClientForREST.framework/GoogleAPIClientForREST' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/GoogleToolboxForMac.framework/GoogleToolboxForMac' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/GoogleUtilities.framework/GoogleUtilities' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/Protobuf.framework/Protobuf' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/leveldb.framework/leveldb' contains bitcode. ITMS-90482: Invalid Executable - The executable 'CalmanacMobileAPP.app/Frameworks/nanopb.framework/nanopb' contains bitcode. |
This is the error:
It looks like there's something that doesn't like the space in the path to your Xcode, so The binlog doesn't show me where the space-broken logic is, but there should be a fairly easy workaround: extract your Xcode again from the xip file, and use a path that doesn't contain spaces (don't rename your existing Xcode, because we've had issues in the past where renaming Xcode causes really weird errors later on - instead it's better to extract it again from the xip file). |
Please get a binary build log (binlog) that shows the error - this explains how to get the binlog: https://github.com/xamarin/xamarin-macios/wiki/Diagnosis#binary-build-logs |
@rolfbjarne @rolfbjarne I've tried, but I am still facing the same issue. When I remove the Firebase NuGet reference from my project, it works, and I can submit my app to the App Store. I need a solution for removing Bitcode from the Firebase NuGet. Can you please assist me with that? |
@rolfbjarne do you think the <Exec Command="xcrun -find bitcode_strip" ConsoleToMSBuild="true"> |
Not sure @vplife1 can you get a binlog that shows the error? That would make it much easier to figure out what's going on on your machine. |
@rolfbjarne @rolfbjarne /Users/apple/Downloads/Vivek/Projects/CalmanacMobileAPP/CalmanacMobileAPP/CalmanacMobileAPP/CalmanacMobileAPP.csproj(3,3): Error MSB3073: The command "/Users/apple/Downloads/Xcode 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip -r -o /Users/apple/.nuget/packages/harfbuzzsharp.nativeassets.ios/2.8.2.3/runtimes/ios/native/libHarfBuzzSharp.framework/libHarfBuzzSharp /Users/apple/.nuget/packages/harfbuzzsharp.nativeassets.ios/2.8.2.3/runtimes/ios/native/libHarfBuzzSharp.framework/libHarfBuzzSharp" exited with code 127. (MSB3073) (CalmanacMobileAPP) |
Yes, @rolfbjarne this is the issue shown in binlog /Users/apple/Downloads/Vivek/Projects/CalmanacMobileAPP/CalmanacMobileAPP/CalmanacMobileAPP/CalmanacMobileAPP.csproj(377,5): error MSB3073: The command "/Users/apple/Downloads/Xcode 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip /Users/apple/.nuget/packages/harfbuzzsharp.nativeassets.ios/2.8.2.3/runtimes/ios/native/libHarfBuzzSharp.framework/libHarfBuzzSharp -r -o /Users/apple/.nuget/packages/harfbuzzsharp.nativeassets.ios/2.8.2.3/runtimes/ios/native/libHarfBuzzSharp.framework/libHarfBuzzSharp" exited with code 127. |
I think this might be an issue with MAX_PATH, where some of the frameworks can't be extracted/created on Windows with the default path locations. Can you try creating a small root directory (say <PropertyGroup>
<XamarinBuildDownloadDir>C:\</XamarinBuildDownloadDir>
</PropertyGroup> If that doesn't work, please get an updated binlog. |
@rolfbjarne |
@maonaoda does the following directory exist on your Windows machine?
|
@rolfbjarne |
I wonder if you're running into this problem: xamarin/xamarin-macios#19229 Can you try the workaround mentioned here to see if that fixes it: xamarin/xamarin-macios#19229 (comment)? |
@rolfbjarne |
Thanks for confirming! |
@rolfbjarne |
@rolfbjarne , @Eilon @KSemenenko , @SotoiGhost CalmanacMobileAPP_Debug_Build_2023-10-25T06_42_14.1545090Z.msbuild.log |
@vplife1 you're still using a path to an Xcode with a space in the path: Can you try and see if this works? I've added quotes to try to support spaces in the Xcode location: <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> |
@rolfbjarne Yes it works thank you! |
Is there still anything to be done here or can this one be closed? |
Hi @KSemenenko. 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. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. |
I personally am still running into this issue, and no work arounds provided have been a solution for me. I used to be able to run the simulator and build to a device, but that all stopped once I added in code to interact with firebase for cloud messaging. I am running on .Net8, and targeting Xcode 15 with Visual Studio on PC linked to my mac. I would like to note that I can still get GitHub Actions to make a release build via MacOs13 runner with Xcode 15.0.1, but I need to be able to debug as well without having to strip out all my push notification/cloud messaging code. |
Hi @KSemenenko. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version. You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository. 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. |
Verified this issue with Visual Studio Enterprise 17.9.0 Preview 1.0. Not repro on iOS platform. |
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.
#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?
This code helped me. the solution works.
Maybe it should be added by default?
Relevant log output
No response
The text was updated successfully, but these errors were encountered: