I use theses function to read out the directory content of my app iCloud folder :
+(NSArray *)getiCloudFileList:(NSString *)icloudPath strMask:(NSString *)strMask {
NSError *error;
NSFileManager *fileManager = [[NSFileManager alloc] init];
NSArray *directoryContent = [fileManager contentsOfDirectoryAtPath:icloudPath error:&error];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF like[cd] %@", strMask];
return [directoryContent filteredArrayUsingPredicate:predicate];
}
This function works fine if the app creates the files. If I copy a file with the Mac OS X Finder into the app folder, for example test1.txt in the directoryContent Array I get the result .test1.txt.icloud.
Gives there another way to get the directory content of an app iCloud folder without the .icloud extension or how can I copy files to an app iCloud folder without the .icloud extension ?