in my Xcode output for NSLog(@"NEW %@", newsUrl) , where I declare newUrl as
NSURL *newsUrl = [NSURL URLWithString:@"/Document/News/1593" relativeToURL:[NSURL URLWithString:@"http://exist.ru"]]:
NSLog output
/Document/News/1593 -- http://exist.ru
but for [newsUrl absoluteString]
NSLog output
http://exist.ru/Document/News/1593
So, I assume that [URLWithString: relativeToURL:] provides you with a URL in a different format. This is the reason your result is invalid.
source share