I am stuck in a very obvious method of NSURL
class URLWithString
I am passing a string
and while creating URL
it returns nil
, my string
is perfect. When ever I uses same string in browser then it is working fine. I am using following method to convert NSString
to NSURL
:
NSURL *url = [NSURL URLWithString:urlString];
//urlString is my perfect string
I have also tried to encode my string first by using following
NSURL *url = [NSURL URLWithString:[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
// using this line my output string when I log url is "url%10%10%10%10%10%10..."
%10 becomes the suffix of my url with around 100+ repetition
.
If any one has idea what %10
is or what can be done to overcome this problem.
here is my urlString
: