PDA

View Full Version : Can't get NSURL corresponding to some NSString




erritikamathur
Nov 30, 2009, 12:08 AM
i m using NSURl method + (id)URLWithString:(NSString *)URLString to get url corresponding to given string.bt i m getting null as result.
Actually i need to created NSURLRequest corresponding to tht url.

So cn some please help tht how cn i get url corresponding to string
im passing for example following string
NSString *sender=@"http://sound13.mp3pk.com/indian/7days/7days01(www.songs.pk).mp3";

for some string i m getting corresponding nsurl but not for some.

Thanks in advance



dejo
Nov 30, 2009, 12:19 AM
How is the issue different than the one you asked about in this thread (http://forums.macrumors.com/showthread.php?t=826301) you started?

KoolStar
Dec 1, 2009, 11:32 AM
Have you already declared the string. If not you need to do NSString *url = [[NSString alloc] initWithString:@"string"];
then release the string [url release];