关于Bitcode是什么,可以看看这篇文章:
https://www.jianshu.com/p/f42a33f5eb61
原创文章,欢迎转载.转载请注明出处: https://www.jianshu.com/p/522da4bd9e6e
下面步入正题:
要让 Framework 支持 Bitcode,除了要求 Enable Bitcode 被默认设置为 YES 之外,还需要给 Other C Flags 添加编译选项 -fembed-bitcode
1.确保 Build Settings -> Enable Bitcode 被设置为 YES :

2.给 Other C Flags 添加编译选项 -fembed-bitcode :

3.其他方案
今天在群里看到一个朋友的技术分享,发现还有另外一种方案:在确保上面第1项设置没问题后,然后在 Build Settings 中,添加一个 “User-Define Setting”,内容填充为:BITCODE_GENERATION_MODE : bitcode ,如下图所示:

我试了一下,生成的.framework文件比上面的方案小了很多。
网友评论