如何以有效的方式在 iOS 项目中包含 OpenSSL [英] How to include OpenSSL on an iOS project in a way that works

查看:23
本文介绍了如何以有效的方式在 iOS 项目中包含 OpenSSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已按照网络上的所有教程进行操作.一切正常,直到我在类中添加这一行:

I have followed all tutorials on the web to do this. Everything works fine, up to the point I add this line on a class:

#import <openssl/pkcs7.h>

然后我有这个错误找不到'openssl/pkcs7.h'文件.

Xcode 有多糟糕?我将每个文件都拖到 Xcode 中,但找不到文件?

How bad can Xcode be? I drag every file to Xcode and the files cannot be found?

这是我现在的结构:

  1. 该应用有 2 个目标,必须在 iPad 上安装 openSSL 吗?
  2. 我使用过这个脚本
  3. iPad 目标位于相对于基本目录路径的以下路径上:Myapp ipad"
  4. 脚本生成了两个文件libcrypto.a"和libssl.a".这两个文件都位于Mhapp ipad"(=Myapp ipad/lib")内一个名为lib"的目录中
  5. 该脚本还生成了一个包含大量文件的include/openssl"目录.我已将其拖到Myapp ipad".所以它现在在MyApp ipad/include"

我如何填充搜索路径、库搜索路径,以及如何使其工作?

How do I fill the search paths, library search paths, whatever to make this work?

推荐答案

最简单的解决方案是使用 CocoaPods - 有一个 OpenSSL pod...

The easiest solution would be to use CocoaPods - there is an OpenSSL pod...

这篇关于如何以有效的方式在 iOS 项目中包含 OpenSSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆