You need to use the file url to get the location of the resource in the file system.
[NSURL fileURLWithPath: documentsDirectory]
You can also use NSFileManager
to get the same URL.
NSArray *arr = [[NSFileManager defaultManager] URLsForDirectory: NSDocumentDirectory inDomains: NSUserDomainMask];
NSURL *documentsUrl = [arr firstObject];
source
share