fileExistsAtPath
and checkResourceIsReachableAndReturnError
both returns NO
Even the file exists at server URL
I have a file in (local)server in
http://10.0.0.15/images/hibrise.png
NSURL *url=[NSURL URLWithString:@"http://10.0.0.15/images/hibrise.png"];
BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:[url path]];
NSLog(fileExists ? @"Yes" : @"No");
I have checked the file permissions also its fine. When I type the same url in my browser it presents the image
'fileExistsAtPath' This method is used to check the file availability in internal file system
checkResourceIsReachableAndReturnError
This is also only for the internal iOS File System This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned
Apple says the same for fileExistsAtPath
What is the best way to check file availability using URL