Removes the specified credential from the credential storage for the specified protection space using the given options.
SDKs
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
func remove(_ credential: URLCredential, for space: URLProtection Space, options: [String : Any]? = nil)
Parameters
credential
The credential to remove.
space
The protection space from which to remove the credential.
options
A dictionary containing options to consider when removing the credential.
For possible keys, see Dictionary Key for Credential Removal Options. You should use this when trying to delete a credential that has the
URLCredential
policy..Persistence .synchronizable Note
When credential objects that have a
URLCredential
policy are removed, the credential will be removed on all devices that contain this credential..Persistence .synchronizable
Discussion
The credential is removed from both persistent and temporary storage.
If you override this method, also override remove(_:
.