Using OpenSSL cocoa pod in iOS project

久未见 提交于 2020-01-03 18:37:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!