From af7b587936b5f839ce961ef539c7bea0e1bee791 Mon Sep 17 00:00:00 2001 From: Bogdan Poplauschi Date: Tue, 31 May 2016 14:51:33 +0300 Subject: [PATCH] Fixed #1573 - Update to cc510a6 - Cached file name with path extension UIWebView issue - for iOS 7 and above, remove the query from the url (prior to iOS 7 the behavior remains the same). --- SDWebImage/SDWebImageManager.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDWebImage/SDWebImageManager.m b/SDWebImage/SDWebImageManager.m index a905e93..7329f51 100644 --- a/SDWebImage/SDWebImageManager.m +++ b/SDWebImage/SDWebImageManager.m @@ -58,7 +58,7 @@ return self.cacheKeyFilter(url); } else { - if (NSClassFromString(@"NSURLComponents")) { + if (NSClassFromString(@"NSURLComponents") && [NSURLComponents instancesRespondToSelector:@selector(string)]) { NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithURL:url resolvingAgainstBaseURL:NO]; urlComponents.query = nil; // Strip out query parameters. return urlComponents.string;