Migrating to Electronic Signatures

This guide covers migrating to the Electronic Signatures component from the older signatures functionality that’s included with the Annotations component with licenses obtained in April 2021 or earlier. The older signatures user interface allows users to sign documents by drawing. Electronic Signatures includes a much-improved user interface that allows users to sign documents by drawing, selecting an image, or typing.

Electronic Signatures requires iOS 13 or newer. Ensure your deployment target is set to at least iOS 13.

Electronic Signatures is a new component, so ensure your license includes the Electronic Signatures feature. Please contact our sales team if they haven’t already reached out to you.

If you don’t make API customizations and instead use PSPDFKit’s default signing experience, then there’s no migration needed, and PSPDFKit will automatically use the newer Electronic Signatures UI.

Signatures stored with the older functionality are fully compatible with Electronic Signatures.

The default value of PDFConfiguration.signatureStore changes to nil when using Electronic Signatures. To restore the previous default storage functionality of saving to the keychain, set a signature store in the main configuration like this:

let pdfViewController = PDFViewController(document: document) {
    $0.signatureStore = KeychainSignatureStore()
}

The signatureSavingStrategy property of PDFConfiguration is used in the same way by both the older signatures functionality and Electronic Signatures. The tool identifier, Annotation.Tool.signature, is also unchanged.

To present the UI for creating an electronic signature, use SignatureCreationViewController instead of SignatureViewController. Reading signature data from a SignatureCreationViewController is currently not supported, except for in the case of drawn signatures, where it’s possible to read stroke data from the drawView property.

The older UI only supported drawing a signature. To keep the same feature set with the Electronic Signatures UI, set the signatureCreationConfiguration’s availableModes to [.draw].

The older signatures UI used the naturalSignatureDrawingEnabled property of PDFConfiguration. With Electronic Signatures, this option is part of the signatureCreationConfiguration property of PDFConfiguration. The signatureCreationConfiguration also includes options to limit or reorder the available signing modes (draw, select image, type) or change the fonts available when typing a signature.

The older signatures UI supported allowing the user to create a digital signature by selecting a certificate from a list of registered signers. When using Electronic Signatures and Digital Signatures, please use the PDFSigner API to add a digital signature. See Using Electronic Signatures and Digital Signatures Together for more details.

If the older signatures functionality met a need you had that isn’t met by Electronic Signatures, please contact us to discuss your use case and see how we can expand the capabilities of Electronic Signatures.