Swim 2.0 compilation error in the generated swift.h file about SecCertificateRef

somewhere in our quick code there is a class with a method with this signature:

static var getCertificates : [SecCertificate] { ... } 

in the generated app-swift.h, this results in:

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

and this gives a compilation error:

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

I tried adding #import before the .h file is included, but it does not solve the problem. I also tried adding import to the pch.h file, but that also does not help.

Since the fast file is generated, I cannot edit it, because it will be overwritten.

Any idea what is missing to compile it?

+7
swift swift2 keychain
source share

No one has answered this question yet.

See related questions:

549
Using the singleton dispatch_once model in Swift
376
Upload / Download Image from URL in Swift
251
You cannot use Swift classes inside Objective-C
44
Swift C header object file with multiple goals
fifteen
ModuleName-Swift.h file not found in xcode8
3
Swift classes inside Objective-C unit test - Incomplete generated "-Swift.h"
2
Auto-generated "ModuleName-Swift.h" header does not include Swift classes
one
Module-Swift.h has a compilation error
0
How to add import to the generated module-swift.h file?
0
project-swift.h compiler errors

All Articles