在我们的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文件,我无法开始编辑它,因为无论如何它都会被覆盖。
知道缺少什么来让它编译?