I want my application to authenticate against appliance i.e passing username and password over https.
I looked at few examples and basically build the following:
You must use NSURLConnectionDelegate delegate to handle NSURLConnection events.
NSURLConnectionDelegate
NSURLConnection
For authentication there are two delegates methods:connection:canAuthenticateAgainstProtectionSpace: and connection:didReceiveAuthenticationChallenge:
connection:canAuthenticateAgainstProtectionSpace:
connection:didReceiveAuthenticationChallenge:
See examples in URL Loading System Programming Guide