Answer

Encoding  parameters in query string or even the url path etc. is required otherwise the url become unusable. This can be achieved by using stringByAddingPercentEscapesUsingEncoding  method.

  1.     NSString *url = @"http://www.developerfeed.com/search.jsp?params=Java Developer";
  2.     NSString* encodedUrl =
  3.     [url stringByAddingPercentEscapesUsingEncoding:
  4.      NSASCIIStringEncoding];
  5.  
  6.    NSLog(@"Encoded URL %@",encodedUrl);
  7.    // output will be
  8.    //http://www.developerfeed.com/search.jsp?params=Java%20Developer;