CommonCrypto isn't building for arch armv7 iOS CommonCrypto isn't building for arch armv7 iOS xcode xcode

CommonCrypto isn't building for arch armv7 iOS


I resolved this issue in a diffent way after I tried both the above where neither worked for me.

The problem was that when I was adding the library from the main interface (main build-settings...etc) I was searching initially for crypto and then two libs comes back libcorecrypto.dylib and liblibcommonCrypto.dylib, if you notice, both exists in gray-color unlike the usually yello-colored libs that you normally add. Adding these causes the compiler to report back (some other libs are missing, such as the libz, or another lib that will be needed the more functions you take on.

If you notice the above two libs would normally sit under JavaScriptCore.framework library (which is the yellow one), therefore, by removing the above two and adding JavaScriptCore.framework instead, the problem was resolved, and build successful showed

Also to mention that based on the gray-libs existing as a bundle inside JavaScriptCore.framework, the libcrypto and the other one will not exists under the /Library/.../system/path as mentioned above, i.e. you didn't delete them from your system, they're just not there.

Again, the solution is:

*From your main XCODE project settings, don't add:*dd

libcorecrypto.dylib liblibcommonCrypto.dylib

Instead, add:

JavaScriptCore.framework

In your .m (code), just source them normally by doing:

#include <CommonCrypto/CommonDigest.h> (or any of your other libs as needed in code)...

It should work fine.

I hope this helps.

Kind Regards


I just solved this as follows:

It turns out that the libcommonCrypto.dylib error was a red herring.

After removing libcommonCrypto.dylib as suggested above, I got 9 new errors.At first glance, I assumed they were Crypto errors, but in fact they were not; for me, it actually traced back to zLib not being included, which was "imported" in a deeper part of the overall implementation (of which crypto is a part).

For me specifically, it traced back to ASIDataDecompressor.h, #import < zlib.h>

I fixed it by including the missing libz.dylib framework; ultimately, I did not have to explicitly include libcommonCrypto.dylib.

So, be sure to check the errors closely after toggling libcommonCrypto, and make sure some OTHER libraries are not missing, instead.


I'm using cocoapods for library management. One of the libraries (you can simple search in your workspace) contained reference to CommonCrypto.framework which was red in the list of frameworks in its project settings.

In my case I had to remove the dependency on CommonCrypto.framework, but this solution lasts just to another update of your pods.

Btw I'd like to know a command to list the graph of dependencies among the libraries in the Podfile.