2

I get this error when I do adhoc export from xcode after I have archived the project:

An error occurred during export

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

But when I export for the appstore it completes as expected

Avba
  • 14,822
  • 20
  • 92
  • 192

2 Answers2

1

I was able to solve it by adding the magic compilation flags:

BITCODE_GENERATION_MODE bitcode

enter image description here

Avba
  • 14,822
  • 20
  • 92
  • 192
0

Make sure all of your framework build only for device. Please stripe out simulator architecture before exporting framework build.

If you are creating build using Jekins following script might work for you

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
Shohrab
  • 546
  • 6
  • 21