菜鸟教程小白 发表于 2022-12-11 18:48:36

ios - 如何在 Fabric Crashlytics 中禁用 LLVM 代码覆盖率


                                            <p><p>在最近向 Apple App Store 提交 iOS 应用时,我在处理构建过程中收到以下错误:</p>

<blockquote>
<p>Invalid Bundle - Disallowed LLVM instrumentation. Do not submit apps
with LLVM profiling instrumentation or coverage collection enabled.
Turn off LLVM profiling or code coverage, rebuild your app and
resubmit the app.</p>
</blockquote>

<p>搜索堆栈溢出,解决方案是在所有依赖项中禁用 LLVM 代码覆盖。我已经为所有开源 Carthage 依赖项完成了此操作,但我仍然收到错误消息。我相信这是因为项目中的 Fabric 和 Crashlytics 依赖项启用了 LLVM 代码覆盖,但我无法禁用它,因为我只能访问 .framework 文件,而不是 .xcodeproj 文件。</p>

<p>如何更改 Fabric/Crashlytics 的 LLVM 代码覆盖率build设置?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>在我们的例子中,Fabric 框架不是上述错误的原因。</p>

<p>Apple 建议在您的存档上运行以下脚本(Xcode 存档操作的输出):</p>

<p><code>nm -m -arch all <PathToArchive>/Products/Applications/<AppName>.app/<AppBinary> | grep gcov</code></p>

<p><code>otool -l -arch all <PathToArchive>/Products/Applications/<AppName>.app/<AppBinary> | grep __llvm_prf</code></p>

<p>但是您可以修改目标“框架”目录的路径而不是应用程序二进制文件,它会打印出启用了检测的框架。</p>

<p>更多信息请访问 <a href="https://developer.apple.com/library/content/qa/qa1964/_index.html#//apple_ref/doc/uid/DTS40017675-CH1-SOURCECODE2" rel="noreferrer noopener nofollow">Resolving App Rejections for GCC and LLVM Instrumentation</a> .</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何在 Fabric Crashlytics 中禁用 LLVM 代码覆盖率,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/46446341/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/46446341/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何在 Fabric Crashlytics 中禁用 LLVM 代码覆盖率