Assumption hypothesis: The iOS side loads the Web page, then the user enters the user name password to log in, the Webserver will record the user login information in the cookie. How the iOS client can access the login information in the cookie.
- The client listens for nshttpcookiemanagercookieschangednotification.
- When a Web page is successfully logged in, the cookie will be changed to nshttpcookiemanagercookieschangednotification the login information from the cookie and save it (keychain, or doc).
- The login cookie is added to the Nshttpcookiestorage each time the client starts or enters the foreground. This cookie is automatically brought in when you create a new webview.
- When a request is initiated by a client, such as ASIHTTPRequest, a cookie is automatically taken from the Nshttpcookiestorage.
iOS Development Implementation Login