无法生成 Bitcode 包(在归档时),因为静态框架 (.framework) 是在没有完整位码的情况下构建的 [英] Bitcode bundle could not be generated (while archiving) because Static Framework (.framework) was built without full bitcode

查看:28
本文介绍了无法生成 Bitcode 包(在归档时),因为静态框架 (.framework) 是在没有完整位码的情况下构建的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试在我们的静态框架中完全启用 Bitcode,但是当框架与其集成时,我们在存档应用程序时收到以下错误,尽管我们能够在模拟器或设备上构建它.

We are trying to enable Bitcode fully in our Static Framework but we are receiving the following error while archiving the app when the framework is integrated with it though we are able to build it on the simulator or device.

ld: bitcode bundle could not be generated because '.framework/p-iOS(PTFWOperationPrepareTransaction.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build file '.framework/p-iOS' for architecture armv7

我们已经通过 otool -l Versions/A/p-iOS 验证了 Bitcode 状态 |grep __bitcode 似乎已正确启用.

We have verified Bitcode state through otool -l Versions/A/p-iOS | grep __bitcode and seems like it is enabled correctly .

以下是我们在框架端对 bitcode 的项目设置,

Following are our project settings for bitcode on framework's end,

以下是我们在应用端bitcode 的项目设置,

And following are our project settings for bitcode on app's end,

谦虚的请求:请查看上面屏幕截图中的设置,因为我们已经检查了 SO 上的所有相关查询,因此请不要将它们作为参考.

A humble request: Please review our settings in the above screenshots as we have already checked all the related queries on SO so please do not give them as a reference.

此外,我们已经尝试过 静态库、框架和 Bitcode 来修复我们的问题.

Also, we have already tried Static Libraries, Frameworks, and Bitcode to get our things fixed.

提前致谢.

推荐答案

我构建的框架也遇到了这个问题.这对我有用:

I also had this problem with a framework I built. This is what worked for me:

  1. 在框架projectBuild Settings中将Other C Flags设置为-fembed-bitcode

target框架的Build Settings中添加一个名为BITCODE_GENERATION_MODE的用户定义标志,值为bitcode

In the Build Settings of the framework target add a user defined flag called BITCODE_GENERATION_MODE with the value of bitcode

在框架项目和目标中,Enable Bitcode都应该设置为Yes

Both in the framework project and target, Enable Bitcode should be set on Yes

这篇关于无法生成 Bitcode 包(在归档时),因为静态框架 (.framework) 是在没有完整位码的情况下构建的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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