Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Blog Reader iPhone App Adapting Data for Display Downloading and Displaying an Image

Lexi Compton
Lexi Compton
3,210 Points

Adapting Data for Display-Challenge 2/3

"Create an instance of NSData named 'data' with the previously created 'url' object."

--->Bummer! Looks like you have not defined 'data'

I don't understand what I'm doing wrong. Any suggestions?

images.m
NSURL *url = [NSURL URLWithString:@"http://teamtreehouse.com/assets/homepage/logo.png"];
NSData *data = [NSData dataWithContentsOfURL:url];

having the same problem; just posted a question myself. the syntax looks good, and is exactly the same as the working syntax in my blog program, which i've finished. This is the only challenge i haven't finished and it's rather frustrating.

5 Answers

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

Sorry for the inconvenience, but this challenge has now been fixed. Essentially the logo URL was broken which was causing the challenge to fail. I've updated the logo URL to: 'http://treehouse-code-samples.s3.amazonaws.com/logo.png'. So make sure you use the new URL when creating an instance of NSURL.

D v B v V
D v B v V
20,109 Points

Tried this one too, to no avail, seems something is wrong in the editor, used exactly the same code as I used in the past

Ian Nebbiolo
Ian Nebbiolo
2,031 Points

I've reported this to the support team. Hopefully will be resolved soon and we can all progress.

it should pass with this line: NSData *data = [NSData dataWithContentsOfURL:url];

Ian Nebbiolo
Ian Nebbiolo
2,031 Points

I'm also unable to pass this. Checked my syntax countless times, and re-written it.