I am trying to open a url in iPhone default browser I did this. The code is actually supposed to get the url from an object based on a selected item in tableview
BlogPost *blogPost = [self.blogPosts objectAtIndex:indexPath.row];
UIApplication *application = [UIApplication sharedApplication];
[application openURL:blogPost.url];
When I run the app i get the error
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString scheme]: unrecognized selector sent to instance 0x7febb263ba30'
I then set an Exception break point, the app crashes at the third line of code displaying the error. What should I do?
blogPost.url
seems to be aNSString
rather than the expectedNSURL
– vadian