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


Open the 'url' object within the default browser using UIApplication.

The problem is to open the 'url' object within the default browser using UIApplication and here is the code. This is what I have so far.

NSURL *url = [NSURL URLWithString:@"http://teamtreehouse.com"];

UIApplication *application = [UIApplication sharedApplication];

/* Write your code below this line */

[application openURL:blogPost.url];

The error says I'm using the wrong method if so which method should I be using?

2 Answers

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

There is no blogPost object in the code challenge. You have a local variable named url declared on the very first line which is what you should use: [application openURL:url];

Thanks it worked.

Robert Uhler
Robert Uhler
3,637 Points

Your NSURL is stored as "url" not "blogPost.url" try changing "blogPost.url" to "url" and it should work.