datatheorem / TrustKit

Easy SSL pinning validation and reporting for iOS, macOS, tvOS and watchOS.
MIT License
2.03k stars 364 forks source link

No known class method for selector 'evaluateTrust:forHostName:' #218

Closed richardtop closed 4 years ago

richardtop commented 4 years ago

I'm using TrustKit with CocoaAsyncSocket when trying to connect both in this method:

- (void)socket:(INGCDAsyncSocket *)sock didReceiveTrust:(SecTrustRef)trust completionHandler:(void (^)(BOOL))completionHandler {
    [TSKPinningValidator evaluateTrust: trust forHostName: @""];
}

I'm getting the following error:

No known class method for selector 'evaluateTrust:forHostName:'

My import statements look as follows:

#import <TrustKit/TrustKit.h>
#import <TrustKit/TSKPinningValidator.h>

What could be causing the issue and how can I resolve it?