"openssl/pkcs7.h" file not found in xcode 7
I am working on a Mac Application which uses following header files
#include <openssl/pkcs7.h>
#include <openssl/objects.h>
#include <openssl/sha.h>
#include <openssl/x509.h>
#include <openssl/err.h>
I recently updated the OSX Yosemite to OSX El Capitan and Xcode 6.4 to 7.0
The project was running successfully before update. Now these files are not available.
What I need to do to get it working again?
One of the solution was for iOS using cocoa pods.
Is there any other way without using cocoa pods?
Apple deprecated openssl some time ago, it's no longer part of the SDK and the library itself doesn't ship with OS X as of 10.11.
Reference here
You didn't mention what are you using openssl for. The solution depends on your needs. If you must use openssl (eg too much of your code depends on it) then you need to obtain openssl yourself, compile with the downloaded headers and include the library with your app distribution. Cocoapods seems like a reasonable way to manage this if you don't want to do it manually.
Or modify your code to use other libraries that do come with OS X like Security Transforms or CommonCrypto.
UPDATE: Seems that Apple's documentation is a bit misleading (surprise!). The dynamic libraries for the older version of openssl (0.9.8) are still distributed with 10.11. Just checked a fresh install of 10.11 and libcrypto and libssl are still there.
If that is sufficient (for example, you just use openssl for App Store receipt validation) you can get away with obtaining just the header files from 10.10 SDK (download it from Apple with xcode 6.4) and compile your app with just the headers. You don't need the actual openssl binaries.
链接地址: http://www.djcxy.com/p/29724.html上一篇: 将属性文件值与数据库中的数据耦合为反