joker-b / oauth

Automatically exported from code.google.com/p/oauth
0 stars 0 forks source link

svn/code/ obj-c/OAuthConsumer/OADataFetcher.m hangs the user interface #147

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
iPhone frameworks are supposed to be designed so that clients of those 
frameworks can use them 
without being aware of threading issues.

OAuthConsumer/OADataFetcher.m uses [NSURLConnection sendSynchronousRequest .. 
which is a 
blocking API that should never be used in real programs. Instead, the fetcher 
should be sending an 
async request with itself as the delegate, and when the NSURLConnection calls 
its delegate back, OADataFetcher should call its delegate using the passed in 
selectors.

Look at the Objective-C GData library for sample source on how this should be 
done.

http://code.google.com/p/gdata-objectivec-client/

Original issue reported on code.google.com by oster@google.com on 26 Feb 2010 at 11:13