上传到iTunesConnect时突然出现错误:ITMS-90635无效的Mach-O格式/ENABLE_BITCODE

7
上周我能够正常将ipa上传到iTunesConnect。但是今天使用Application Loader上传时,出现以下错误:
ERROR ITMS-90635: "Invalid Mach-O Format. The Mach-O in bundle "Application.app/Frameworks/PSPDFKit.framework" isn’t consistent with the Mach-O in the main bundle. The main bundle Mach-O contains armv7(machine code) and arm64(machine code), while the nested bundle Mach-O contains armv7(bitcode and machine code) and arm64(bitcode and machine code). Verify that all of the targets for a platform have a consistent value for the ENABLE_BITCODE build setting."
我了解这里提出的解决方案:Xcode - Error ITMS-90635 - Invalid Mach-O in bundle - submitting to App store和其他许多方案。
然而,我不知道如何将任何提出的解决方案应用于Xamarin iOS项目。我没有使用任何pods,而是使用PSPDFKit的绑定库,按照官方文档https://pspdfkit.com/guides/ios/current/other-languages/xamarin/中所述创建。
据我所见,我有两种方法可选,一种是在我的项目中启用位码(我不知道如何操作),另一种是在PSPDFKit的绑定项目中禁用位码(我也不知道如何操作)。
我感激任何帮助或建议。

禁用项目的位码。构建设置 > 构建选项 > 启用位码 > 设置为NO - 这是针对Xcode的,不知道在Xamarin IDE中如何操作。 - Evgeny Karkan
似乎苹果最近进行了提交更改。由于您的库具有位码,请在主应用程序.csproj中尝试将其设置为“true”https://dev59.com/Xpfga4cB1Zd3GeqPBM1B#37684483 - SushiHangover
谢谢您的建议。我将MtouchEnableBitcode属性设置为true,但显然Xamarin iOS不支持它,因为在编译过程中我收到了这个错误信息。/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: Error: Error executing task MTouch: Bitcode is currently not supported on iOS. - Eugen Timm
当我设置那个属性时,我不会得到那个错误,这很奇怪。你确定你正在使用最新版本吗?我相信Xamarin昨天推出了一个新的稳定版。 - Jelle
1个回答

0

我终于做到了,使用这篇帖子中的一个解决方案之一https://dev59.com/uFoU5IYBdhLWcg3wTVke#37624641

我所做的是从我的库中剥离Bitcode,可以使用以下命令完成:

$ xcrun bitcode_strip -r {PATH_TO_LIBRARY} -o tmp.dylib

该命令将机器码从库中提取到tmp.dylib文件中,然后可以使用该文件代替库本身。在PSPDFKit的情况下,库位于框架内。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接