NSDocumentDirectory files disappear in ios
I want to save a mp4 video in my folder but when I open again the app, this file is nil. But when I save the file, I can open it, so it seems that it disappears from the folder. Save: NSData *videoData = [NSData dataWithContentsOfURL:exportUrl]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *tempPath = [documentsDirectory stringByAppendingFormat:@"/%@",videoName]; self.path_video_to_save = tempPath; BOOL success = [videoData writeToFile:tempPath atomically:YES]; if (success)