I'm pretty sure the following would work just as well --

```
NSString *template = [NSTemporaryDirectory() stringByAppendingPathComponent:@"workspace_XXXXXX"];
...
mkdtemp([template UTF8String]);
```