Skip to content

1.5.0

Compare
Choose a tag to compare
@nabla-c0d3 nabla-c0d3 released this 13 Jul 14:02
· 200 commits to master since this release
  • Implemented major changes to support the usage of multiple instances of TrustKit, instead of being forced to use a singleton.
    • This is useful for larger Apps that have split some of their functionality into multiple frameworks/SDKs. Each framework can initialize its own instance of TrustKit and use it for pinning validation independently of the App's other components. See the -initWithConfig: method for more information.
    • The singleton approach should still be used by most Apps as it is simpler. A few minor code changes are required for Apps migrating from previous versions, detailed at the end of this page.
  • Pinning validation notifications have been removed and replaced by a callback that can be set in order to receive information about any pinning validation performed by TrustKit. See the pinningValidatorCallback property of the TrustKit class for more information.
  • The default value for the kTSKSwizzleNetworkDelegates setting has been changed to NO.
  • Support for iOS 7 and macOS 10.9 has been dropped.

Migrating from 1.4.2

For initializing TrustKit, switch from:

[TrustKit initializeWithConfiguration:trustKitConfig];

to:

[TrustKit initSharedInstanceWithConfiguration:trustKitConfig];

For any code using the TSKPinningValidator class, switch from:

[TSKPinningValidator handleChallenge:challenge completionHandler:completionHandler];

to:

[TrustKit.sharedInstance.pinningValidator handleChallenge:challenge completionHandler:completionHandler];