PSPDFConflictResolutionManager

Objective-C


@interface PSPDFConflictResolutionManager : NSObject <PSPDFOverridable>

Swift

class ConflictResolutionManager : NSObject, Overridable

Handles conflict resolution UI presentation in response to a PSPDFDocumentUnderlyingFileChangedNotification. Invokes the delegate to perform the selected conflict resolution option when done.

Warning

This class manages UI and it’s methods should only be used on the main thread.
  • Presents UI for file conflict resolution for a deleted source file.

    The presented actions should invoke the resolutionManager:requestingFileConflictResolutionForDocument:dataProvider:withResolution:, delegate passing the document, dataProvider and the selected conflict resolution option.

    Declaration

    Objective-C

    - (nullable UIViewController *)
        controllerForFileDeletionResolutionOnDocument:
            (nonnull PSPDFDocument *)document
                                         dataProvider:
                                             (nonnull id<
                                                 PSPDFCoordinatedFileDataProviding>)
                                                 dataProvider;

    Swift

    func controllerForFileDeletionResolution(on document: PSPDFDocument, dataProvider: CoordinatedFileDataProviding) -> UIViewController?

    Parameters

    document

    The document who’s file was deleted.

    dataProvider

    The data provider that detected the change and can be used for conflict resolution.

    Return Value

    A view controller with conflict resolution options. By default a UIAlertController instance. If nil is returned, no UI will be presented an a default resolution applied (removing the document from the view controller).

  • Presents UI for file conflict resolution for an externally modified source file.

    The presented actions should invoke the resolutionManager:requestingFileConflictResolutionForDocument:dataProvider:withResolution:, delegate passing the document, dataProvider and the selected conflict resolution option.

    Declaration

    Objective-C

    - (nullable UIViewController *)
        controllerForExternalFileChangeResolutionOnDocument:
            (nonnull PSPDFDocument *)document
                                               dataProvider:
                                                   (nonnull id<
                                                       PSPDFCoordinatedFileDataProviding>)
                                                       dataProvider;

    Swift

    func controllerForExternalFileChangeResolution(on document: PSPDFDocument, dataProvider: CoordinatedFileDataProviding) -> UIViewController?

    Parameters

    document

    The document who’s file was externally modified.

    dataProvider

    The data provider that detected the change and can be used for conflict resolution

    Return Value

    A view controller with conflict resolution options. By default a UIAlertController instance. If nil is returned, no UI will be presented an a default resolution applied (reloading the document to reflect the external change).