Hi,
currently i'm trying to access the files that are transferred using the new ios feature introduced with 3.2.
- (NSString *)getPrivateDocsDir {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
documentsDirectory = [documentsDirectory stringByAppendingPathComponent:@"Private Documents"];
NSError *error;
[[NSFileManager defaultManager] createDirectoryAtPath:documentsDirectory withIntermediateDirectories:YES attributes:nil error:&error];
return documentsDirectory;
}
// and then in a method
NSString *documentsDirectory = [self getPrivateDocsDir];
NSArray *files = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:documentsDirectory error:&error];
the problem is, this works fine in simulator, but on my iphone, the files
array is empty.
any ideas how to access this directory directly?
thanks!