Xcode 7'CrashReporter不包含bitcode'链接器错误 [英] Xcode 7 'CrashReporter does not contain bitcode' linker error

查看:327
本文介绍了Xcode 7'CrashReporter不包含bitcode'链接器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我直接在我的iOS应用程序中链接PLCrashReporter而不使用任何外部工具,现在当我尝试在Xcode 7上编译它时,我收到链接错误:

I am directly linking PLCrashReporter in my iOS app without using any external tool and now when I try to compile it on Xcode 7 I get link error:


ld:
'... / CrashReporter.framework / CrashReporter(libCrashReporter-iphoneos.a-armv7-master.o)'
不包含bitcode。您必须使用bitcode启用
(Xcode设置ENABLE_BITCODE)重建它,从
供应商处获取更新的库,或禁用此目标的bitcode。 for architecture armv7

ld: '.../CrashReporter.framework/CrashReporter(libCrashReporter-iphoneos.a-armv7-master.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7

我从哪里获得更新的框架或源代码,以便在启用bitcode的情况下编译它们并在不禁用的情况下摆脱错误完整项目的bitcode?

Where do I get the updated framework or the sources to compile them with bitcode enabled and get rid of the error without disabling bitcode for the full project?

推荐答案

我最后通过从源代码构建PLCrashReporter 1.2.1来解决这个问题。此版本是Xcode 7和iOS9修复程序合并的最小版本。

I ended up addressing this by building PLCrashReporter 1.2.1 from source. This version is the minimum that has had Xcode 7 and iOS9 fixes merged.

来源是从这里获得的: PLCrashReporter 1.2.1

The source is obtained from here: PLCrashReporter 1.2.1

解压缩下载的1.2.1源代码将文件夹中的Xcode项目放到Xcode中,并将以下内容添加到项目构建设置的自定义编译器设置其他C标志部分中:到文件夹中。

Unzip the downloaded 1.2.1 source into a folder.

-fembed-bitcode

接下来将以下内容添加到项目的自定义编译器设置其他警告标志部分构建设置: -Wno-error = unused-command-line-argument

Next add the following to the Custom Compiler Settings "Other Warning Flags" section of the project build settings: -Wno-error=unused-command-line-argument

然后从Xcode关闭项目GUI。自定义设置是必要的,因为我们将使用xcodebuild从命令行构建以避免PLCR弃用错误,并且在这样做时,默认情况下只有-fembed-bitcode-marker以这种方式构建框架。我们正在覆盖默认行为,并且需要抑制这种导致的硬停止警告。

Then close the project from the Xcode GUI. The custom settings are necessary because we are going to build from the command line using xcodebuild to avoid the PLCR deprecation errors, and when doing so the default is only -fembed-bitcode-marker when building a framework this way. We are overriding the default behavior, and need to suppress the hard stop warning this causes.

最后,从源文件夹中的zip文件所在的终端窗口提示符包括xcode项目文件位于以下运行:

Lastly, from a terminal window prompt within the folder where the zip file of the source including the xcode project file is located run the following:

xcodebuild -configuration发布-target'Disk Image'

这将运行构建并将框架保留在 ./ build / Release / PLCrashReporter-1.2.1 / iOS Framework

This will run the build and leave the framework in ./build/Release/PLCrashReporter-1.2.1/iOS Framework

现在,这些步骤将生成一个支持bitcode的框架,但第三方崩溃报告与bitcode不兼容(当App Store重新编译时,你无法获得符号来自该版本的文件)。

Now, these steps will produce a bitcode enabled framework, but third party crash reporting is incompatible with bitcode (when the App Store recompiles you have no way to get the symbol file from that on the fly build).

这篇关于Xcode 7'CrashReporter不包含bitcode'链接器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆