I am trying to wrap my head around creating and using bitcode libraries. I am compiling a library from the command line, and first used -fembed-bitcode-marker. That caused xcode to stop showing the error that the library needed to be recompiled with bitcode when running on the device. However, then I get the error :
full bitcode bundle could not be generated because XX/XX was built only with bitcode marker. The library must be generated from Xcode archive build with bitcode enabled
I saw on another site, that is due to the fact, that the library needs to be built using -fembed-bitcode (not -fembed-bitcode-marker), so I did that. Now, when I try to archive, xcode says:
ld: warning: ignoring file X, file was built for archive which is not the architecture being linked (arm64).
However, with this new library, I can install install my project onto my device with no warnings about bitcode needing to be enabled (and I assume that now it actually enabled vs. when I compiled using -fembed-bitcode-marker). So, why does ld show this warning when trying to archive, since it builds and runs fine on the device (running on the simulators shows the same error).