When I use this code:
NSString *requestText;
requestText = [NSString stringWithFormat:
@"http://makrr.com/Music/*******/*****/******.php?search=%@",
searchField.text];
NSLog(@"requestText is: %@", requestText);
NSURL *url;
url = [NSURL URLWithString:requestText];
NSLog(@"url is: %@", url);
The log shows:
2011-08-19 10:12:10.172 Rumblrr[2246:607] requestText is: http://makrr.com/Music/*******/*****/******.php?search=******
2011-08-19 10:12:10.175 Rumblrr[2246:607] url is: (null)`
Because there are some thing in your requestText can NOT be convert to an URL.
Check your requestText about the ** parts, see if there are some text need to be URL Encoded first.