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 trialLexi Compton
3,210 PointsAdapting 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?
NSURL *url = [NSURL URLWithString:@"http://teamtreehouse.com/assets/homepage/logo.png"];
NSData *data = [NSData dataWithContentsOfURL:url];
5 Answers
Amit Bijlani
Treehouse Guest TeacherSorry 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
.
Ian Nebbiolo
2,031 PointsThanks Amit :)
D v B v V
20,109 PointsTried 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
2,031 PointsI've reported this to the support team. Hopefully will be resolved soon and we can all progress.
Christian Deciga
5,600 Pointsit should pass with this line: NSData *data = [NSData dataWithContentsOfURL:url];
Ian Nebbiolo
2,031 PointsI'm also unable to pass this. Checked my syntax countless times, and re-written it.
Jeff Rosenthal
1,879 PointsJeff Rosenthal
1,879 Pointshaving 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.