PSPDFConflictResolutionManagerDelegate

Objective-C

@protocol PSPDFConflictResolutionManagerDelegate <NSObject>

/// Invoked when the conflict resolution selection completes.
///
/// The implementing object should resolve the file conflict (externally removed or modified file) using the
/// selected conflict resolution option.
///
/// Designed to be invoked from: `controllerForFileDeletionResolutionOnDocument:dataProvider:dataProvider:` and
/// `controllerForExternalFileChangeResolutionOnDocument:dataProvider:dataProvider:`.
///
/// @param manager A reference to the resolution manager that invoked this call.
/// @param document The current document.
/// @param dataProvider The document's data provider that detected the file change.
/// @param resolution The conflict resolution option that should be performed.
/// @param error An optional error describing the failure.
/// @return YES, if the resolution was successful and no otherwise.
- (BOOL)resolutionManager:(PSPDFConflictResolutionManager *)manager requestingFileConflictResolutionForDocument:(PSPDFDocument *)document dataProvider:(id<PSPDFCoordinatedFileDataProviding>)dataProvider withResolution:(PSPDFFileConflictResolution)resolution error:(NSError **)error;

@optional

/// Invoked just before the conflict resolution UI is displayed.
///
/// This callback can be used to suppress UI presentation and instead perform a conflict resolution
/// action immediately.
///
/// @param manager A reference to the resolution manager that invoked this call.
/// @param document The current document.
/// @param dataProvider The document's data provider that detected the file change.
/// @param type The type of conflict that is being resolved.
/// @param resolution The conflict resolution option that should be performed. A default value is passed based on the conflict type. This can be modified by assigning a new value to `*resolution`.
- (BOOL)resolutionManager:(PSPDFConflictResolutionManager *)manager shouldPerformAutomaticResolutionForForDocument:(PSPDFDocument *)document dataProvider:(id<PSPDFCoordinatedFileDataProviding>)dataProvider conflictType:(PSPDFFileConflictType)type resolution:(inout PSPDFFileConflictResolution *)resolution;

/// Specifies the view controller that should be used for UI presentation.
///
/// If not implemented or if the specified view controller is not currently being displayed,
/// the topmost view controller reachable from last known window will be used to display UI during a conflict.
///
/// @note Called on the main thread.
///
/// @param manager A reference to the resolution manager that invoked this call.
/// @return A view controller suitable for modal UI presentation.
- (UIViewController *)viewControllerForPresentationForResolutionManager:(PSPDFConflictResolutionManager *)manager;

@end

Swift

protocol ConflictResolutionManagerDelegate : NSObjectProtocol

Undocumented