关于SecCertificateRef生成的swift.h文件中的swift 2.0编译错误

时间:2015-09-03 16:40:46

标签: swift keychain swift2

在我们的swift代码中某处有一个带有此签名的方法的类:

static var getCertificates : [SecCertificate] { ... }
生成的app-swift.h中的

导致:

 @interface TrustedCertificates : NSObject
     + (NSArray<SecCertificateRef> * __nonnull)getCertificates;
 @end

,这给出了编译错误:

 Type argument 'SecCertificateRef' (aka 'struct __SecCertificate *') is neither an Objective-C object nor a block type

我尝试在包含.h文件之前添加#import,但它没有解决错误。 我也尝试将导入添加到pch.h文件中,但这也无济于事。

由于生成了swift文件,我无法开始编辑它,因为无论如何它都会被覆盖。

知道缺少什么来让它编译?

0 个答案:

没有答案