Can someone confirm that -checkResourceIsReachableAndReturnError: method of NSURL is working as expected. I have tried using it for known URLs and
-checkResourceIsReachableAndReturnError:
NSURL
You can use this method:
- (BOOL) validateUrl: (NSString *) url { NSString *theURL = @"(http|https)://((\\w)*|([0-9]*)|([-|_])*)+([\\.|/]((\\w)*|([0-9]*)|([-|_])*))+"; NSPredicate *urlTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", theURL]; return [urlTest evaluateWithObject:url]; }