casademora
casademora

Reputation: 69687

How do I download contents into an NSData using a Secure URL?

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?

Upvotes: 0

Views: 3623

Answers (1)

Azeem.Butt
Azeem.Butt

Reputation: 5861

Try running your URL through this first

Upvotes: 3

Related Questions