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 trialappliaison
2,832 PointsYour code challenge checker seems to be broken. My answer is correct : NSURL *url = [NSURL urlWithString:@"http..
NSURL *url = [NSURL urlWithString:@"http://teamtreehouse.com"];
but it keeps saying "Bummer"
Please fix your code checker.
/* Add task 1 code here */
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
NSURLSession *session = [NSURLSession sharedSession];
/* Add task 2 code below */
NSURLSessionDownloadTask *task;
NSURL *url = [NSURL urlWithString:@"http://teamtreehouse.com"];
1 Answer
Chris Shaw
26,676 PointsHi App Liaison,
The code challenge is working perfectly fine, based on your code you've simply misinterpreted what the task is asking for.
Task 1
Before the lines provided, create an instance of NSURL named
url
with the following URL: 'http://teamtreehouse.com'.
What this is saying is you need to create a new NSURL instance just after the task 1 comment, also the constructor for string URL's needs to be have URL
in capital letters.
/* Add task 1 code here */
NSURL *url = [NSURL URLWithString:@"http://teamtreehouse.com"];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
NSURLSession *session = [NSURLSession sharedSession];
/* Add task 2 code below */
NSURLSessionDownloadTask *task;
Happy coding!
Frances Angulo
5,311 PointsFrances Angulo
5,311 PointsA wise man once said,
Never doubt the integrity of the TeamTreeHouse code checker. Look within thine self first.