【发布时间】:2016-09-19 04:57:42
【问题描述】:
我正在构建一个混合语言框架。我主要有 Swift 文件和一些 Objective-C 文件。
Objective-C 文件之一是使用 CommonCrypto 的加密类。
似乎由于某种原因我无法导入它,即使我可以在 Objective-C 框架中导入它。
谁能解释一下这是为什么?
当我需要在 Swift 框架中的 Objective-C 中使用 CommonCrypto 时,我发现的所有其他解决方案都在谈论如何在 Swift 中使用 CommonCrypto。
附注:
我尝试在伞头文件中添加导入,如下所示:
#import <CommonCrypto/CommonCrypto.h>错误:Include of non-modular header inside framework module 'name of header'这个答案没有解决问题:answer
【问题讨论】:
-
你在哪里插入导入指令?
-
@ElTomato 我的 Objective-c 类头文件.. 也尝试了伞头文件
-
请提交bug report,这是一个常见问题,Apple 多年来一直忽略 Common Crypto,而使用 Swift 只会变得更糟。
标签: ios xcode swift ios9 ios-frameworks