我尝试使用bitcode导出adhoc时出错

时间:2017-04-03 12:46:26

标签: xcode ad-hoc-distribution bitcode

我在归档项目后从xcode执行adhoc导出时出现此错误:

导出期间发生错误

Failed to verify bitcode in Someframework.framework/Someframework Cannot extract bundle from /var/folders/rg/8ydk5h297ng50z_3dpkr5jx00000gn/T/XcodeDistPipeline.5rb/Root/Payload/...

但是当我为appstore导出时,它按预期完成

2 个答案:

答案 0 :(得分:1)

我能够通过添加魔术编译标志来解决它:

BITCODE_GENERATION_MODE bitcode

enter image description here

答案 1 :(得分:0)

确保所有框架仅针对设备构建。请在导出框架构建之前对模拟器架构进行分区。

如果您使用Jekins创建构建,则以下脚本可能适合您

if [ -d  ./${BUILD_DIR}/YOURFramework.framework ] && lipo ./${BUILD_DIR}/YOURFramework.framework/YOURFramework.framework -verify_arch x86_64; then
lipo -remove i386 ./${BUILD_DIR}/YOURFramework.framework/YOURFramework.framework -output ./${BUILD_DIR}/YOURFramework.framework/YOURFramework.framework
lipo -remove x86_64 ./${BUILD_DIR}/YOURFramework.framework/YOURFramework.framework -output ./${BUILD_DIR}/YOURFramework.framework/YOURFramework.framework