-
NSOperation, NSURLConnection, and NSRunLoop on iPhone
Posted on December 31st, 2009 No commentsWhen using an
NSOperationwith anNSURLConnectionperforming asynchronously, this blog post indicates that one must add a connection port (an emptyNSPortobject) to the current run loop in order to keep the thread alive during the “polling” process using theNSRunLoopduring the execution of thestartmessage on the subclassedNSOperation.Handling Credentials
This forum post talks about how to integrate the use of credentials using an
NSOperationandNSURLConnection. These two articles are important to be taken together, because in order to respond to authentication challenges from a server (e.g., basic authentication challenge from a REST web service), the only way to do it is with asynchronous networking, because that is the only way a delegate is used in the connection process.Leave a reply



