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

Sudden Error when Uploading to iTunesConnect: ITMS-90635 Invalid Mach-O Format / ENABLE_BITCODE

上周我能够很好地将我的 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."

我知道此处提出的解决方案: 以及许多其他解决方案。

但是我不知道如何将任何建议的解决方案应用于 Xamarin iOS 项目。我没有使用任何 pods,而是使用 PSPDFKit 的绑定库,这是我按照官方文档 https://pspdfkit.com/guides/ios/current/other-languages/xamarin/.

中的描述创建的

据我所知,有两种方法可供我使用,要么在我的项目中启用位码(我不知道该怎么做),要么在 PSPDFKit 的绑定项目中禁用位码(我不知道该怎么做)也不知道该怎么做)。

非常感谢任何帮助或建议。

我终于能够做到这一点,其中一个解决方案来自这个 post

我所做的是从我的库中删除 Bitcode,这可以通过以下命令完成:

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

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