Certificate Pinning

Optionally, if you want to use Certificate Pinning, provide metadata for the upload process. You can pass your public key pinning configuration (TrustKit repo for more information), the metadata information, and the API type (the Gini Pay API is used by default) as follows:

import TrustKit let yourPublicPinningConfig = [ kTSKPinnedDomains: [ "pay-api.gini.net": [ kTSKPublicKeyHashes: [ // old *.gini.net public key "cNzbGowA+LNeQ681yMm8ulHxXiGojHE8qAjI+M7bIxU=", // new *.gini.net public key, active from around June 2020 "zEVdOCzXU8euGVuMJYPr3DUU/d1CaKevtr0dW0XzZNo=" ]], "user.gini.net": [ kTSKPublicKeyHashes: [ // old *.gini.net public key "cNzbGowA+LNeQ681yMm8ulHxXiGojHE8qAjI+M7bIxU=", // new *.gini.net public key, active from around June 2020 "zEVdOCzXU8euGVuMJYPr3DUU/d1CaKevtr0dW0XzZNo=" ]], ]] as [String: Any] let viewController = GiniCapture.viewController(withClient: client, configuration: giniConfiguration, resultsDelegate: resultsDelegate, publicKeyPinningConfig: yourPublicPinningConfig, documentMetadata: documentMetadata, api: .default) present(viewController, animated: true, completion:nil)

Starting from Gini Capture SDK version 1.0.6 certificate pinning requires iOS 12.

  • The document metadata for the upload process is intended to be used for reporting.

  • The multipage is supported only by the .default api.