datatheorem / TrustKit

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

Random crash - TrustKit was not initialized #306

Open TomBentz opened 1 year ago

TomBentz commented 1 year ago

Hi,

I have a published app using TrustKit. Sometimes I received crash logs from Crashlytics

Fatal Exception: TrustKit was not initialized TrustKit must be initialized using +initSharedInstanceWithConfiguration: prior to accessing sharedInstance

I configure TrustKit using the plist key TSKConfiguration, and only use TrustKit.sharedInstance().pinningValidator.handle(challenge, completionHandler: completionHandler) on every network call.

How can this crash only occurs sometimes and 98% of the users don't have it ?