importDidFinish(completionHandler:)
Tells the File Provider extension that the system finished importing items.
Declaration
optional func importDidFinish(completionHandler: @escaping @Sendable () -> Void)optional func importDidFinish() asyncParameters
- completionHandler:
A block that your implementation must call.
Discussion
The system calls this method after importing on-disk items. You can trigger an import by calling either reimportItems(below:completionHandler:) or import(_:fromDirectoryAt:completionHandler:). The system can also initiate its own imports as needed.
During the import, the system calls your File Provider extension’s createItem(basedOn:fields:contents:options:request:completionHandler:) method and passes the mayAlreadyExist option. Check to see if the item already exists in your remote storage—uploading it if necessary.
After importing all the items, the system calls your importDidFinish(completionHandler:) method. Handle any necessary cleanup operations, and then call the completion handler.