问题
I'm trying to import OpenSSL pod header files into my iOS project. However, Xcode cannot find OpenSSL
header. It says
#import <OpenSSL/bio.h>
OpenSSL/bio.h
file not found
But I was able to command + click
to jump to the bio.h
The OpenSSL pod is installed successfully and my PodFile
is like below
platform :ios, '9.0'
use_frameworks!
target 'MyProject' do
pod 'OpenSSL', '~> 1.0'
end
using Xcode 7.2
Edit
I have tried clean, build and delete Derived Data
folder but still not working.
回答1:
1) I have created sample project
2) Added pod 'OpenSSL', '~> 1.0'
3) Closed project and then opened Project_Name.xcworkspace
4) used #import <OpenSSL/bio.h>
5) Command + Shift + K
(for cleaning project)
6) Command + Shift + B
(for building it)
It worked for me on Xcode7.2
. Try this.
回答2:
Build the project after you add a pod dependency to the project.
Command + b
will do the job.
来源:https://stackoverflow.com/questions/34804890/using-openssl-cocoa-pod-in-ios-project