ios - 在 iOS 项目中使用 OpenSSL cocoa pod

标签 ios xcode cocoa openssl cocoapods

我正在尝试将 OpenSSL pod 头文件导入我的 iOS 项目。但是,Xcode 找不到 OpenSSL header 。它说

#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

使用 Xcode 7.2

编辑

我已尝试清理、构建和删除 Derived Data 文件夹,但仍然无法正常工作。

最佳答案

1) 我已经创建了示例项目
2) 添加了pod 'OpenSSL', '~> 1.0'
3) 关闭项目然后打开Project_Name.xcworkspace
4)二手#import <OpenSSL/bio.h>
5) Command + Shift + K (用于清洁项目)
6) Command + Shift + B (用于构建它)

它对我有用 Xcode7.2 .试试这个。

关于ios - 在 iOS 项目中使用 OpenSSL cocoa pod,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34804890/

相关文章:

ios - 多个 CGContextRefs?

objective-c - 为什么 Core Animation 方法是类方法而不是实例方法?

ios - 获取用户的通知设置

ios - 更新到 XCode 6.3 (Swift 1.2) 后出现 "Objective-C method conflicts with optional requirement method"错误

ios - 通过呈现 Controller 创建抽屉导航?

objective-c - 如何将多对多关系绑定(bind)到tableview?

ios - 来自类 'UIViewController' 和 'UISearchBar' 的多重继承

ios - TableView 行中的两个单元格

ios - iphone 在一个 UIViewController 和另一个 UIViewController 之间切换

ios - 如何将 ViewController 数组转换为协议(protocol)类型数组