I am trying to compile a Swift application for Archive (testing build), however i'm facing a very strange and isolated error:
error: Invalid bitcode version (Producer: '800.0.38.0_0' Reader: '703.0.31_0')
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The weird thing is the app compiles to a device, test suites run and a standard (CMD+B) build action all succeed. The only action that fails is Product > Archive.
I'm using Cocoapods and have confirmed all pods are looking at a Swift 2.3 branch and compatible with my app. Lastly, I tried this build on a completely different dev machine (MacPro) and have hit the same snag.
When I disable bitcode in Build Settings it compiles properly. I'm left to believe this is an issue with one of the pods, possibly not built with the proper flags. If anyone has further insight as i'd like to keep bitcode enabled, if at all possible.
Any help is greatly appreciated.
ENABLE BITCODE in Build Settings of your target and try to
Archive it. Disabling
ENABLE BITCODE does not have any adverse effect on product archive. Since this is an optional flag for Apple, so you can disable it unless Apple makes it required flag in the future. For more details, you can refer to Bitcode Enabling/Disabling