title: Get iPhone directory path in C++
body: <p>I am using a C++ library from an Objective-C layer. I want to be able to access this path, or at least it's container identifying string, directly in the C++ library.</p>
  
  <p>(NB: In production we are able to pass the identifier from the Objective-C layer, but this is to try and get the path directly in CI)</p>
  
  <p>For example, if I get the <code>NSDocumentDirectory</code> path in Objective-C, the path is easy:</p>
  
  <pre><code>/var/mobile/Containers/Data/Application/93C788E8-3F76-4DD2-BC5F-7980BE9970C7/Documents
  </code></pre>
  
  <p>I could strip out the GUID (<code>93C788E8-3F76-4DD2-BC5F-7980BE9970C7</code>) from this path and pass it, but I need to be able to generate it purely in C++. Our CI is running our unit test suite directly on a device instead of a simulator. I know that this is basically a unix command, but I've spent my morning snooping around, and coming up empty. Any ideas where to look?</p>