1

I need to create a dummy .m4a file of a certain length programatically under iOS...

Stone Alessandro
  • 359
  • 3
  • 14

1 Answers1

0

try this

NSError *error = nil;
path = [path stringByAppendingPathComponent:@"tempfile"];
NSURL *URL = [NSURL fileURLWithPath:path];
[[NSFileManager defaultManager]createFileAtPath:path contents:nil attributes:nil]
NSFileHandle *writeFile = [NSFileHandle fileHandleForWritingToURL:URL error:&error];
[writeFile truncateFileAtOffset:4000000000*sizeof(Byte)];
user698333
  • 78
  • 1