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
Mohamad Nur Amin Shahril
Courses Plus Student 1,689 PointsBuild failed in Xcode in video "Downloading and Parsing Data"
Hi,
when I write this code in Xcode during tutorial,
NSURL *blogURL = [blogURL URLWithString:@"http://blog.teamtreehouse.com/api/get_recent_summary/"];
there's no method of URLWithString in my Xcode, for your information my version of Xcode was 4.6.2,
it shows the red symbol denoted error in coding, when I clicked on that error it said:
"No Visible @interface for 'NSURL' declare the selector 'URLWithString:'"
what does it means?
is it method of URLWithString was removed by Apple in Update 4.6.2?
extra:
usually when we write a method it appears blue color in the Xcode but when I'm typing this method it does not show up any color.
thanks
2 Answers
Patrick Serrano
13,834 PointsYou need to call the URLWithString method on NSURL not the blogURL pointer, so it should look like this:
NSURL *blogURL = [NSURL URLWithString:@"http://blog.teamtreehouse.com/api/get_recent_summary/"];
Mohamad Nur Amin Shahril
Courses Plus Student 1,689 Pointsoh man it so closed. how did I see it, maybe I'm so sleepy during watching video. Thanks a lot Patrick.