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).

This commit is contained in:
Bogdan Poplauschi 2016-05-31 14:51:33 +03:00 committed by Bogdan Poplauschi
parent 9112170ea3
commit 22fded56cf
1 changed files with 1 additions and 1 deletions

View File

@ -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;