问题
RN 项目使用AliOSS,JS的SDK无法使用,无奈使用了iOS的SDK,然后转化为JS接口,模拟器中运行正常。archive操作会报下面的错误,原因是缺了相关的bitcode。
解决办法是在编译脚本增加配置
xcodebuild OTHER_CFLAGS="-fembed-bitcode" -target XXXX build
或者
. This will build your lib with bitcode```
ld: bitcode bundle could not be generated because '/Users/tzt/.../iOS/AliyunOSSiOS.framework/AliyunOSSiOS(OSSHTTPDNSMini.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
## 解决办法
我目前的解决办法是关闭掉了`enable_bitcode`选项,`-fembed-bitcode`加入后没有效果,如果有谁有更好的办法,请告知
参考文章:
http://stackoverflow.com/questions/31486232/how-do-i-xcodebuild-a-static-library-with-bitcode-enabled
Xcode 7 Bitcode的工作流程及安全性评估
http://www.cocoachina.com/ios/20151218/14744.html