Write to temp iOS snippet

from blog lmno.lol @alvaro, | ↗ original
NSString *tempDir = NSTemporaryDirectory(); NSLog(@"%@\n", tempDir); NSString *dataFilePath = [tempDir stringByAppendingPathComponent:@"my.file"]; [data writeToFile:dataFilePath atomically:YES];