prepare(forError:)
Performs any necessary setup or configuration when an authentication error occurs.
Declaration
func prepare(forError error: any Error)Parameters
- error:
An object representing the authentication error. Your File Provider extension can pass additional information in the error’s Userinfo property.
Discussion
While your file provider is enumerating its content, the system calls this method whenever your file provider returns an NSFileProviderErrorDomain error with a NSFileProviderError.Code.notAuthenticated code. Use this method to present an interface to authenticate the user.