Having these flags enabled
ENABLE_BITCODE=YES
BITCODE_GENERATION_MODE=bitcode
OTHER_C_FLAGS=-fembed-bitcode
An .xarchive is successfully built which is then packaged using xcodebuild into a xcframework.
But when it is included in a test app with bitcode enabled, it would complain with
"...does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target."
When it is built with the latest swift (Swift5.3), bitcode is indeed enabled and runs fine.
Why doesn't 5.1 work and is there any documentation pointing to which version where enabling bitcode actually gets properly bundled with the .archive?