PSPDFKit 8 Migration Guide

This guide covers updating an iOS project from PSPDFKit 7.x to PSPDFKit 8. Despite the major version change, the version 8 update should be relatively straightforward, so we encourage you to update as soon as possible, in order to take advantage of future new features and fixes.

PSPDFKit 8.0.0 for iOS fully supports iOS 10, 11, and 12. iOS 10 support will be removed later during the PSPDFKit 8 lifecycle. Xcode 10 or later is required to use this version of the SDK. Learn more in our Version Support guide.

Sharing Architecture Changes

Up until now, invoking the share action in PSPDFKit directly presented a UIActivityViewController. We then had to identify the activity that was selected from the share sheet to see if we could inject our customization logic. This allowed the user to decide if they wanted to embed, flatten, or ignore annotations, along with other customization options.

One major downside this approach had is that we couldn’t offer customization options for every item in the share sheet, which resulted in a less than optimal experience: Sharing a document to Mail.app would let the user decide whether or not they wanted to embed or flatten the annotations into the shared document, but sharing to WhatsApp or Messenger wouldn’t.

In PSPDFKit 8 for iOS, the way documents are shared was revamped to offer a significantly improved experience that allows the user to pick their desired sharing options while being flexible enough to offer customization options that allow developers to adjust the experience to their liking.

As a consequence, the API related to sharing changed a bit:

  • PSPDFDocumentSharingCoordinator and its subclasses (Mail, Messages, OpenIn) were removed.

  • All sharing-related properties in PSPDFConfiguration were removed. They were replaced with a new sharingConfigurations property that holds an array of PSPDFDocumentSharingConfiguration objects.

To learn more about the new document sharing flow and customization options, please refer to our dedicated Document Sharing guide.

Please note that, as part of this architecture revamp, a lot of code that hadn’t previously been deprecated has been removed, so you’re likely to see compilation errors if you’re upgrading from an earlier version and have been using sharing-related APIs.

As a concrete example, if you were using PSPDFDocumentActionExecutor before and you wish to replicate that behavior, you can do so by creating a PSPDFNamedAction and passing it to -executePDFAction:targetRect:pageIndex:animated:actionContainer::

let action = PSPDFNamedAction(namedActionType: .print)
controller.execute(action, targetRect: .zero, pageIndex: controller.pageIndex, animated: true, actionContainer: nil)
PSPDFNamedAction *action = [[PSPDFNamedAction alloc] initWithNamedActionType:PSPDFNamedActionTypePrint];
[controller executePDFAction:action targetRect:CGRectZero pageIndex:controller.pageIndex animated:YES actionContainer:nil];

The table below shows all APIs that were removed (and hadn’t been previously deprecated) as part of this change.

Removed API Migration Strategy
PSPDFDocumentActionExecutor The document action executor is no longer needed.
-[PSPDFViewController documentActionExecutor] The document action executor is no longer needed.
PSPDFActivityTypeBookmarks Use -[PSDPFViewController bookmarkButtonItem] to show the bookmark view controller
PSPDFActivityTypeSearch Use -[PSPDFViewController searchButtonItem] to start a search on the document.
PSPDFActivityTypeOutline Use -[PSPDFViewController outlineButtonItem] to show the outline view controller.
PSPDFActivityGoToPage Create a PSPDFNamedAction for PSPDFNamedActionTypeGoToPage and use -[PSPDFViewController executePDFAction:targetRect:pageIndex:animated:actionContainer:].
-[PSPDFViewController activityViewControllerWithSender:] Subclass PSPDFDocumentSharingViewController and override - activityViewControllerForSharingItems:sender:.
PSPDFDocumentSharingCoordinator The sharing coordinators have been removed in favor of the new PSPDFDocumentSharingConfiguration strategy.
PSPDFMailCoordinator Use +[PSPDFDocumentSharingConfiguration defaultConfigurationForDestination:] to share documents via PSPDFDocumentSharingViewController.
PSPDFMessageCoordinator Use +[PSPDFDocumentSharingConfiguration defaultConfigurationForDestination:] to share documents via PSPDFDocumentSharingViewController.
PSPDFOpenInCoordinator Use +[PSPDFDocumentSharingConfiguration defaultConfigurationForDestination:] to share documents via PSPDFDocumentSharingViewController.
PSPDFPrintCoordinator Use +[PSPDFDocumentSharingConfiguration defaultConfigurationForDestination:] to share documents via PSPDFDocumentSharingViewController.
PSPDFDocumentSharingOptions Use PSPDFDocumentSharingFileFormatOptions, PSPDFDocumentSharingPagesOptions, and PSPDFDocumentSharingAnnotationOptions instead.
-[PSPDFConfiguration applicationActivities] Use -[PSPDFDocumentSharingConfiguration applicationActivities].
-[PSPDFConfiguration excludedActivityTypes] Use -[PSPDFDocumentSharingConfiguration excludedActivityTypes].
-[PSPDFConfiguration printSharingOptions] Modify fileFormatOptions, pageSelectionOptions, and annotationOptions on a PSPDFDocumentSharingConfiguration instance created with the print destination.
-[PSPDFConfiguration openInSharingOptions] Modify fileFormatOptions, pageSelectionOptions, and annotationOptions on a PSPDFDocumentSharingConfiguration instance created with the activity destination.
-[PSPDFConfiguration mailSharingOptions] Modify fileFormatOptions, pageSelectionOptions, and annotationOptions on a PSPDFDocumentSharingConfiguration instance created with the mail destination.
-[PSPDFConfiguration messageSharingOptions] Modify fileFormatOptions, pageSelectionOptions, and annotationOptions on a PSPDFDocumentSharingConfiguration instance created with the message destination.
-[PSPDFDocumentSharingViewControllerDelegate didFinishWithSelectedOptions:files:annotationSummary:error:] Use -[PSPDFDocumentSharingViewControllerDelegate documentSharingViewController:didFinishSharingWithConfiguration:userInfo:error:].
-[PSPDFDocumentSharingViewControllerDelegate documentSharingViewControllerDidCancel] Use -[PSPDFDocumentSharingViewControllerDelegate documentSharingViewController:didCancelSharingAtStep:withConfiguration:].
-[PSPDFDocumentSharingViewControllerDelegate documentSharingViewController:shouldPrepareWithSelectedOptions:selectedPageRange:] Use -[PSPDFDocumentSharingViewControllerDelegate documentSharingViewController:shouldProcessForSharingWithState:].
-[PSPDFDocumentSharingViewControllerDelegate documentSharingViewController:titleForOption:] Subclass PSPDFDocumentSharingViewController and override - titleForAnnotationOptions:.
-[PSPDFDocumentSharingViewControllerDelegate documentSharingViewController:subtitleForOption:] Subclass PSPDFDocumentSharingViewController and override - subtitleForAnnotationsOptions:sharingConfiguration:.
-[PSPDFDocumentSharingViewControllerDelegate documentSharingViewController:configureCustomProcessorConfigurationOptions:] Subclass PSPDFDocumentSharingViewController and override - configureProcessorConfigurationOptions:.
-[PSPDFDocumentSharingViewControllerDelegate documentSecurityOptionsForDocumentSharingViewController:] Subclass PSPDFDocumentSharingViewController and override - documentSecurityOptions.
-[PSPDFDocumentSharingViewControllerDelegate temporaryDirectoryForDocumentSharingViewController:] Subclass PSPDFDocumentSharingViewController and override - temporaryDirectoryForSharingToDestination:.
-[PSPDFDocumentSharingViewController initWithDocuments:visiblePageRange:allowedSharingOptions:] Use - [PSPDFDocumentSharingViewController initWithDocuments:] and set its properties.
-[PSPDFDocumentSharingViewController commitWithCurrentSettings] Use -[PSPDFDocumentSharingViewController commitWithCurrentConfiguration].
-[PSPDFDocumentSharingViewController sharingOptions] Use the sharingConfigurations property to get the entire list of available configurations, or use -[PSPDFDocumentSharingViewController currentSharingConfigurationForDestination:] to get the configuration for a given destination.
-[PSPDFDocumentSharingViewController selectedOptions] Use the selectedAnnotationOption, selectedPageSelectionOption, and selectedFileFormatOption properties.
-[PSPDFDocumentSharingViewController delegateDocumentSecurityOptions] Subclass PSPDFDocumentSharingViewController and override - documentSecurityOptions.
-[PSPDFDocumentSharingViewController delegateConfigureCustomProcessorConfigurationOptions:] Subclass PSPDFDocumentSharingViewController and override - configureProcessorConfigurationOptions:.

Page Coordinate System Normalization

Each page in a PDF document has its own Cartesian coordinate space, which is used to define the location of the page contents, annotations, and more. Usually, the origin of such a coordinate space is the bottom-left corner of the page. However, pages can be displayed rotated from how the coordinates are stored, and there can also be a crop box set on a page, which cuts down the displayed area. These are achieved by setting the Rotation or CropBox properties on the page dictionary in the PDF. This makes performing these changes very easy: You don’t need to change the content stream or any of the annotations on the page. Unfortunately, this can also be confusing to work with.

Versions before PSPDFKit 8 for iOS used the raw PDF coordinate space in the API, while our newer SDKs — PSPDFKit for Android, Windows, and Web — expose a normalized coordinate system where the origin is always in a consistent corner of the onscreen page. PSPDFKit for iOS has been updated to match this: The origin of each page coordinate space is now always in the bottom-left corner of what you see.

This is a breaking change. The API has been simplified accordingly, so compiler errors should guide you in updating. We anticipate that in most cases, you can simplify your code by deleting any handling of page rotation or offset.

If you need the bounding rectangle of the page, similar to a UIView’s bounds, you may have used PSPDFPageInfo’s rect or rotatedRect before. Instead, create a rectangle with an origin of zero and a size equal to the page info’s size:

let pageRect = CGRect(origin: .zero, size: pageInfo.size)

If you had specific code paths for each rotation value so that something appeared consistent regardless of page rotation, then you can just keep the zero case and delete the other paths:

switch pageInfo.rotation {
case rotation0:
    // This is the only code path that needs keeping.
    ...
case rotation90:
    ...
case rotation180:
    ...
case rotation270:
    ...
}

The normalization applies to PSPDFRenderDrawBlock too. The block signature can’t be changed without causing silent breaking changes. However, the page rectangle parameter now always has an origin of zero. The integer that previously passed the page rotation is no longer used and should be ignored.

The parameters of the coordinate space conversion functions have changed. PSPDFConvertViewPointToPDFPoint, PSPDFConvertPDFPointToViewPoint, PSPDFConvertPDFRectToViewRect, PSPDFConvertViewRectToPDFRect, PSPDFConvertViewLinesToPDFLines, PSPDFConvertViewLineToPDFLines, and PSPDFConvertPDFLinesToViewLines used to require a page rectangle and rotation. These two parameters have been replaced by PSPDFPageInfo. The other values were probably being obtained from a page info instance anyway. The conversion methods on PSPDFPageView are still preferred over these functions.

Removed API Migration Strategy
-[PSPDFPageInfo rect] If you want the displayed page size, use size. If you want the frame of the page in the raw PDF coordinate space, use cropBox, and if that’s not set, fall back to mediaBox.
-[PSPDFPageInfo rotatedRect] Same as rect above. Note that rotatedRect could have had a non-zero origin.
-[PSPDFPageInfo rotationTransform] The best equivalent is transform, but note that the old property only considered page rotation, while the new one considers both page rotation and crop box offset.
-[PSPDFPageInfo rotation] This has been separated into savedRotation and rotationOffset, so the exact equivalent is (savedRotation + rotationOffset) % 360. These properties now use the PSPDFRotation type to make the requirement of 90-degree steps clearer.
-[PSPDFDocumentProvider setRotation:forPageAtIndex:] This has been renamed to setRotationOffset:forPageAtIndex:. The behavior when used on already rotated pages has changed.
-[PSPDFMarkupAnnotation textOverlayAnnotationWithGlyphs:pageRotation:] Replaced with -[PSPDFTextMarkupAnnotation textOverlayAnnotationWithGlyphs:] since the page rotation is no longer required (and this class has been renamed).

Render Options

More APIs expecting rendering options use PSPDFRenderOption instead of NSString, which makes expectations clearer. This reduces the need to use rawValue in Swift.

Removal of Deprecated APIs

All previously deprecated APIs have been removed.

PSPDFKitUI

Removed API Migration Strategy
+[PSPDFNewPageConfiguration newPageConfigurationWithEmptyPageBuilder:] Use PSPDFPageTemplate.blankTemplate to generate a blank page configuration.
+[PSPDFNewPageConfiguration newPageConfigurationWithTiledPattern:builderBlock:] Use +newPageConfigurationWithPageTemplate:builderBlock:.
+[PSPDFNewPageConfiguration newPageConfigurationWithDocument:sourcePageIndex:builderBlock:] Use +newPageConfigurationWithPageTemplate:builderBlock: and provide a PSPDFPageTemplate built with a document.
-[PSPDFDocumentViewLayout pagingEnabled] Paging is automatically enabled if spreadBasedZooming is enabled.
-[PSPDFNoteAnnotationViewController borderColor] The items in the option view no longer have a border.
-[PSPDFNoteAnnotationViewController beginEditing] Consider building a custom UI to display an annotation’s contents instead.
-[PSPDFNoteAnnotationViewController deleteAnnotationActionTitle] Consider building a custom UI to display an annotation’s contents instead.
-[PSPDFNoteAnnotationViewController deleteOrClearAnnotationWithoutConfirmation] Consider building a custom UI to display an annotation’s contents instead.
-[PSPDFNoteAnnotationViewController deleteAnnotation:] Consider building a custom UI to display an annotation’s contents instead.
-[PSPDFNoteAnnotationViewController shouldBeginEditModeWhenPresented] The decision of starting to edit when presented is now made automatically based on heuristics that determine how likely it is for the user to want to start editing.
-[PSPDFNoteAnnotationViewController showCopyButton] This is not recommend because copying text by selecting it is easy.
-[PSPDFNoteAnnotationViewController allowEditing] Use PSPDFAnnotation.isEditable or PSPDFConfiguration.editableAnnotationTypes instead.
PSPDFPageTransitionScrollPerPage Use PSPDFPageTransitionScrollPerSpread instead, as it properly illustrates what this mode does.
-[PSPDFScrubberBar updatePageMarker] This method no longer updates the page index. Instead, the page index is set internally when it changes.
-[PSPDFPageView insertAnnotations:] This method is no longer used to insert annotations. To know when annotations are inserted, listen for PSPDFAnnotationCreateActionDidInsertNotification instead. To add annotations, use - addAnnotations:options: on PSPDFDocument.
-[PSPDFPageLabelView updateLabelWithDocument:pageRange:] The page label is automatically updated internally.
-[PSPDFDrawView currentDrawLayer] Sublayers can be accessed by querying the UIView.layer property.
-[PSPDFDrawView drawLayers] Sublayers can be accessed by querying the UIView.layer property.
-[PSPDFDrawView clearAllLayers] Use the -clear method instead.
-[PSPDFDrawView updateActionsForAnnotations:] Use the - updateForAnnotations: method instead.
-[PSPDFPageView showNoteControllerForAnnotation:showKeyboard:animated:] Use showNoteControllerForAnnotation:animated: instead. The handling of showing the keyboard is now done automatically based on heuristics that determine how likely it is for the user to want to start editing.
-[PSPDFPageView showSignatureControllerAtRect:withTitle:options:animated:] Use showSignatureControllerAtRect:signatureFormElement:options:animated: instead.
enum PSPDFThumbnailFlowLayoutAttributesType Use PSPDFDocumentViewLayoutPageMode instead.
-[PSPDFThumbnailFlowLayoutAttributes type] Use pageType instead.
-[PSPDFThumbnailFlowLayout typeForIndexPath:usingDoublePageMode:] The layout now uses its delegate to determine page modes.
-[PSPDFThumbnailFlowLayout doublePageModeDisabled] The layout now uses its delegate to determine page modes.
-[PSPDFThumbnailFlowLayout doublePageMode] The layout now uses its delegate to determine page modes.
-[PSPDFThumbnailFlowLayout presentationContext] The layout now uses its delegate to determine page modes.
-[PSPDFThumbnailFlowLayout indexPathForDoublePage:] The layout now uses its delegate to determine page modes.
-[PSPDFNewPageViewControllerDelegate newPageController:didFinishSelectingConfiguration:] Use -[PSPDFNewPageViewControllerDelegate newPageController:didFinishSelectingConfiguration:pageCount:].
-[PSPDFViewControllerDelegate pdfViewControllerDidChangeControllerState:] Use -[PSPDFViewControllerDelegate pdfViewController:didChangeControllerState:error:] instead.
-[PSPDFViewController brightnessManager] Use PSPDFKitGlobal.sharedInstance.brightnessManager instead.
-[PSPDFThumbnailViewController updateEmptyView] Use -[PSPDFThumbnailViewController refreshLoadingViewWithLoadingState:].
-[PSPDFThumbnailViewController updateFilterAndVisibleCellsAnimated:] Use -[PSPDFThumbnailViewController refreshResultsForCurrentFilter].
-[PSPDFThumbnailViewController pagesForFilter:] Use -[PSPDFThumbnailViewController pagesForFilter:groupingResultsBy:result:completion:].
-[PSPDFScreenController externalScreensDisableScreenDimming] Use PSPDFBrightnessManager.idleTimerManagement instead.
-[PSPDFSelectionState selectedGlyphs] This property has been removed in favor of the selectedGlyphRange field.
PSPDFBackButtonStyle Use PSPDFButtonStyle instead.
-[PSPDFUserInterfaceView updatePageLabelFrameAnimated:] The user interface view now uses Auto Layout to position the page label.

PSPDFKit

Removed API Migration Strategy
-[PSPDFFileDataProvider initWithFileURL:baseURL:progress:] The baseURL is no longer used. Always use an absolute fileURL.
-[PSPDFFileDataProvider baseURL] The baseURL is no longer used.
-[PSPDFDiskCache jpegCompression] Use compression instead.
-[PSPDFDocumentEditor addPageAt:withConfiguration:] Use -[PSPDFDocumentEditor addPagesInRange:withConfiguration:].
PSPDFSignatureHashAlgorithmSHA386 Use PSPDFSignatureHashAlgorithmSHA384 instead.
-[PSPDFSignatureStatus wasModified] Use coversEntireDocument instead.
PSPDFPageRenderer PSPDFPageRenderer is no longer needed.
-[PSPDFDocumentSecurityOptions initWithOwnerPassword:userPassword:] Use -initWithOwnerPassword:userPassword:error: instead.
-[PSPDFDocumentSecurityOptions initWithOwnerPassword:userPassword:keyLength:] Use initWithOwnerPassword:userPassword:keyLength:permissions:error: instead.
-[PSPDFDocumentSecurityOptions initWithOwnerPassword:userPassword:keyLength:permissions:encryptionAlgorithm:] Use -initWithOwnerPassword:userPassword:keyLength:permissions:encryptionAlgorithm:error: instead.
+[PSPDFProcessor generatePDFFromConfiguration:securityOptions:outputFileURL:progressBlock:error:] Create a PSPDFProcessor instance by passing a PSPDFProcessorConfiguration and calling the appropriate instance methods.
+[PSPDFProcessor generatePDFFromConfiguration:securityOptions:progressBlock:error:] Create a PSPDFProcessor instance by passing a PSPDFProcessorConfiguration and calling the appropriate instance methods.
+[PSPDFProcessor generatePDFFromConfiguration:securityOptions:outputDataSink:progressBlock:error:] Create a PSPDFProcessor instance by passing a PSPDFProcessorConfiguration and calling the appropriate instance methods.
+[PSPDFProcessor generatePDFFromHTMLString:outputFileURL:options:completionBlock:] Create a PSPDFProcessor instance by passing a PSPDFProcessorConfiguration and calling the appropriate instance methods.
+[PSPDFProcessor generatePDFFromHTMLString:options:completionBlock:] Create a PSPDFProcessor instance by passing a PSPDFProcessorConfiguration and calling the appropriate instance methods.
+[PSPDFProcessor generatePDFFromURL:outputFileURL:options:completionBlock:] Create a PSPDFProcessor instance by passing a PSPDFProcessorConfiguration and calling the appropriate instance methods.
+[PSPDFProcessor generatePDFFromURL:options:completionBlock:] Create a PSPDFProcessor instance by passing a PSPDFProcessorConfiguration and calling the appropriate instance methods.
-[PSPDFDocument isJavaScriptEnabled] Use javaScriptStatus instead.
-[PSPDFPrivateKey encryptionAlgorithm] Use signatureEncryptionAlgorithm instead.
-[PSPDFAnnotationStateManager toggleStampController:includeSavedAnnotations:presentationOptions:] Showing saved annotations in the same view controller as stamps is no longer supported. Use - toggleStampController:presentationOptions: instead.
PSPDFAnnotationChangedNotificationAnimatedKey Use PSPDFAnnotationOptionAnimateViewKey instead.
PSPDFAnnotationOptionUserCreatedKey Wrap annotation creation code invoked by your users with PSPDFUsernameHelper to prompt for the author name when needed.
PSPDFAnnotationTriggerEventLooseFocus Use PSPDFAnnotationTriggerEventLoseFocus instead.
-[PSPDFAnnotation rotation] Use the rotation properties PSPDFStampAnnotation and PSPDFFreeTextAnnotation instead.
+[PSPDFAnnotation annotationFromJSONDictionary:documentProvider:error:] PSPDFJSONSerializing has been removed in favor of using InstantJSON.
PSPDFJSONSerializing Use InstantJSON.
PSPDFJSONAdapter Use InstantJSON.
-[PSPDFFileAnnotation appearanceName] Use -iconName instead.
-[PSPDFSoundAnnotation initRecorderWithOptions:] Use -initWithRecorderOptions:.
-[PSPDFSoundAnnotation initRecorder] Use -initWithRecorder.
PSPDFStyleManagerLastUsedKey Use PSPDFAnnotationStyleTypeLastUsed.
PSPDFStyleManagerGenericStylesKey Use PSPDFAnnotationStyleTypeGeneric.
PSPDFStyleManagerColorPresetKey Use PSPDFAnnotationStyleTypeColorPreset.
-[PSPDFWord initWithGlyphs:pageRotation:] Use -[PSPDFWord initWithGlyphs:frame:] instead.
-[PSPDFWord initWithFrame:pageRotation:] Use -[PSPDFWord initWithGlyphs:frame:] instead.
-[PSPDFWord pageRotation] The page’s rotation should be retrieved from the page rather than from its text.
-[PSPDFWord glyphs] Use range to get appropriate glyphs from PSPDFTextParser.
-[PSPDFTextBlock pageRotation] The page’s rotation should be retrieved from the page rather than from its text.
-[PSPDFTextBlock glyphs] Use range to get appropriate glyphs from PSPDFTextParser.
-[PSPDFTextBlock initWithGlyphs:pageRotation:] Use -[PSPDFTextBlock initWithGlyphs:frame:] instead.
-[PSPDFTextBlock initWithFrame:pageRotation:] Use -[PSPDFTextBlock initWithGlyphs:frame:] instead.
PSPDFMarkupAnnotation Use PSPDFTextMarkupAnnotation instead.
-[PSPDFMarkupAnnotation highlightedString] Use -[PSPDFTextMarkupAnnotation markedUpString] instead.
PSPDFAnnotationTypeRedact Use PSPDFAnnotationTypeRedaction instead.
PSPDFAnnotationStringRedact Use PSPDFAnnotationStringRedaction instead.

Instant

Removed API Migration Strategy
-[PSPDFInstantClientDelegate instantClient:didFinishDownloadForDocument:] Use - instantClient:didFinishDownloadForDocumentDescriptor:.
-[PSPDFInstantClientDelegate instantClient:didFailDownloadForDocument:error:] Use - instantClient:documentDescriptor:didFailDownloadWithError:.
-[PSPDFInstantClientDelegate instantClient:didFailAuthenticationForDocument:] Use - instantClient:didFailAuthenticationForDocumentDescriptor:.
-[PSPDFInstantClientDelegate instantClient:didFailUpdatingAuthenticationTokenForDocument:error:] Use - instantClient:documentDescriptor:didFailReauthenticationWithError:.
-[PSPDFInstantClientDelegate instantClient:didUpdateAuthenticationToken:forDocument:] Use - instantClient:documentDescriptor:didFinishReauthenticationWithJWT:.
-[PSPDFInstantClientDelegate instantClient:didBeginSyncingDocument:] Use - instantClient:didBeginSyncForDocumentDescriptor:.
-[PSPDFInstantClientDelegate instantClient:didChangeSyncStateForDocument:] Use - instantClient:didChangeSyncStateForDocumentDescriptor:.
-[PSPDFInstantClientDelegate instantClient:didFailSyncingDocument:error:] Use - instantClient:documentDescriptor:didFailSyncWithError:.
-[PSPDFInstantClientDelegate instantClient:didFinishSyncingDocument:] Use - instantClient:didFinishSyncForDocumentDescriptor:.
-[PSPDFInstantClient initWithServerURL:] Migrate to - initWithServerURL:error:.
-[PSPDFInstantClient documentDescriptorWithIdentifier:error:] Migrate to - documentDescriptorForJWT:error:.
-[PSPDFInstantDocumentDescriptor updateAuthenticationToken:] Use - reauthenticateWithJWT: instead.
-[PSPDFInstantDocumentDescriptor downloadDocumentUsingAuthenticationToken:error:] Migrate to - downloadUsingJWT:error:.
PSPDFInstantAuthenticationTokenKey Use PSPDFInstantJWTKey instead.
PSPDFInstantDidUpdateAuthenticationTokenNotification Use PSPDFInstantDidFinishReauthenticationNotification instead.
PSPDFInstantDidFailUpdatingAuthenticationTokenNotification Use PSPDFInstantDidFailReauthenticationNotification instead.