SHARE
TWEET

Untitled

a guest Jan 18th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. NSURL *URL = [NSURL URLWithString:sourceUrl];
  2.     NSError *error=[[[NSError alloc]init] autorelease];
  3.  
  4.  
  5.     NSData* theData = [NSData dataWithContentsOfURL: URL];   // Line One to download
  6.     NSURLResponse *response1 = nil;
  7.     NSURLRequest *theRequest =[[NSURLRequest requestWithURL:URL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60] autorelease];
  8.     NSData* theData1 = [NSURLConnection sendSynchronousRequest:theRequest returningResponse:&response1 error:&error];   // Line two to download
  9.  
  10.     if(error != nil)
  11.     {
  12.         NSString *errorIdentifier = [NSString stringWithFormat:@"(%@)[%d]",error.domain,error.code];        
  13.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top