views:

403

answers:

1

I'm starting with the following snip to download an image

NSError *error = nil;
NSString *url = @"https://...";
[NSData dataWithContentsOfURL:[NSURL urlWithString:url] options:nil error:&error];

When this code runs, the error instance contains an error without a whole lot of information in the userInfo. It's just the secure url that was attempted.

Given the results, I'm pretty sure these methods don't handle secure URLs.

My question:

Is there an easy way (like these methods, or some option) to set the dataWithContentsOfURL: method to download over a secure url?

+1  A: 

Try running your URL through this first

Azeem.Butt
Turns out the server cert is invalid. Oddly, safari didn't show a warning. It was only after loading the URL in firefox did I get a message with the invalid cert and details. Giving you the credit for the help though, thanks.
casademora