Asynchronously stores (or updates) a shared password for a website.
- iOS 8.0+
The fully qualified domain name of the website requiring the password.
The account name associated with this password.
The password to be stored. Pass
NULLto remove a shared password if it exists.
A block invoked when the function has completed.
The block takes one argument:
If the shared password was successfully added (or removed),
NULL; if not successful, a
CFErrorobject that encapsulates the reason why the password could not be added (or removed). The error reference is automatically released after this handler is called, though you may optionally retain it for as long as needed.
This function adds a shared password item that will be accessible by Safari and apps that have the specified fully qualified domain name in their
Associated Domains Entitlement. If a shared password item already exists for the specified website and account, it is updated with the provided password. To remove a password, pass
NULL for the password parameter.
When this function is called, the system tries to get the site association file from the server. If the file is unavailable, the sever returns a 500-599 code.