Contents

claimKnownFolders(_:localizedReason:completionHandler:)

Asks the domain to sync the specified known folders.

Declaration

func claimKnownFolders(_ knownFolders: NSFileProviderKnownFolderLocations, localizedReason: String, completionHandler: @escaping  @Sendable ((any Error)?) -> Void)
func claimKnownFolders(_ knownFolders: NSFileProviderKnownFolderLocations, localizedReason: String) async throws

Discussion

Use this method to claim a set of known folders according to the information in the knownFolders parameter. The system only enables sync for these folders in the domain if the set of locations is valid and if the user agrees.

See Also

Syncing Desktop and Documents folders