- (NSURL *)applicationDocumentsDirectory { NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentPath = [searchPaths objectAtIndex:0]; // NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); // NSString *documentPath = [searchPaths lastObject]; return [NSURL fileURLWithPath:documentPath]; }