writeToFile を使用して、オーディオ ファイルをローカルの iphone ディレクトリに書き込みます。次回アプリを起動すると、パス / URL が存在しなくなり、ファイルを取得できません。
助けていただければ幸いです。
保存:
NSArray *dirPaths;
NSString *docsDir;
dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
docsDir = [dirPaths objectAtIndex:0];
NSString *tempFileName = [[NSString alloc] init];
tempFileName = [[alertView textFieldAtIndex:0]text];
NSString *soundFilePath = [docsDir stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.wav", tempFileName]];
BOOL success = [videoData writeToFile:soundFilePath atomically:YES];
読む:
if ([[NSFileManager defaultManager] fileExistsAtPath:[urlArray objectAtIndex:indexPath.row]])
urlArray にはファイルへのパスが含まれており、この If ステートメントは false です。