I register a file representation on my dragItem's Itemprovider like the following:
When I drop the thumbnail onto the desktop a breakpoint on
line 14 is called, but finder creates a Copy.
I've created the fileCoordinator with .forMoving.
I've registered the file representation with fileOptions: .openInPlace
I'm also responding with true in
Is there something else I'm missing for finder to consider this a moveable file URL?
Code Block swift provider.registerFileRepresentation(forTypeIdentifier: itemTuple.uti, fileOptions: .openInPlace, visibility: .all, loadHandler: { (completion: ((URL?, Bool, Error?) -> Void)) -> Progress? in let fileCoord = NSFileCoordinator(filePresenter: nil) var fileError: NSError? let progress = Progress(totalUnitCount: 1) progress.completedUnitCount = 1 fileCoord.coordinate(writingItemAt: url, options: [.forMoving], error: &fileError, byAccessor: { [fileError] fileURL in if let error = fileError { completion(nil, false, error) progress.completedUnitCount = 1 } completion(fileURL, true, nil) progress.completedUnitCount = 1 }) return progress })
When I drop the thumbnail onto the desktop a breakpoint on
line 14 is called, but finder creates a Copy.
I've created the fileCoordinator with .forMoving.
I've registered the file representation with fileOptions: .openInPlace
I'm also responding with true in
Code Block public func collectionView(_ collectionView: UICollectionView, dragSessionAllowsMoveOperation session: UIDragSession) -> Bool
Is there something else I'm missing for finder to consider this a moveable file URL?