5

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.

Aamir
  • 16,329
  • 10
  • 59
  • 65
Raymond
  • 1,172
  • 16
  • 20
  • be sure you open right file (xcworkspace) – Daniyar Jan 15 '16 at 07:23
  • I could be wrong since I don't use Swift or Ciciapods, but C is case-sensitive. That usually means you ***`#import `***, and not ***`#import `***. Also, If your OpenSSL is installed locally, you usually use ***`#import "openssl/bio.h"`*** – jww Jan 17 '16 at 00:52

2 Answers2

3

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.

Aamir
  • 16,329
  • 10
  • 59
  • 65
  • Can you please help me to add openssl in my project step by step. – Ravi Dec 09 '16 at 13:10
  • @Ravi do you want to add `OpenSSL` pod in your project? – Aamir Dec 09 '16 at 13:12
  • yes, i have tried, using terminal written "pod init", next what should i do. One more thing, only pod file is sufficient for OpenSSL library. Please explain me clearly. – Ravi Dec 09 '16 at 13:20
  • @Ravi please follow this link: http://stackoverflow.com/questions/20755044/how-to-install-cocoa-pods for setting up pods in iOS project, and yes you only need pods for openssl library. – Aamir Dec 09 '16 at 13:51
0

Build the project after you add a pod dependency to the project.

Command + b will do the job.

Jason Nam
  • 2,011
  • 2
  • 13
  • 22