IOS9公司開始瘦身計(jì)劃,公司整體推進(jìn)bitcode方案,
公司對(duì)接的.a大大小小有10幾個(gè),各個(gè)團(tuán)隊(duì)都需要支持bitcode,在發(fā)包的時(shí)候發(fā)現(xiàn)用腳本打包有問(wèn)題:
bitcode bundle could not be generated because 'xxx.a(xxx.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7
然后莫名其妙的查個(gè)遍都沒有發(fā)現(xiàn)問(wèn)題,隨后goole發(fā)現(xiàn)了問(wèn)題
I was able to fix this by adding "-fembed-bitcode" to Other C Flags of the project I am building a static lib of. It will give you a warning because a normal build adds "-fembed-bitcode-marker" but -fembed-bitcode takes precedence over the dummy marker
需要在所有的.a庫(kù)在bundlsetting Other C Flags 添加-fembed-bitcode 或者你打包.a的編譯添加上此選項(xiàng)。
特意去找了
蘋果視頻
Preparing for On-Demand Resources
App Distribution Guide: App Thinning