title: Writing to the DCIM folder on iPad/iOS
body: <p>I'm trying to write some images in the DCIM folder on an iPad, for good reasons: to allow the user to import these images to their Aperture or Lightroom without having to use the iTunes Shared Library (which is a 'broken feature', half done).</p>
  
  <p>I tried to browse the filesystem to find the name of the folder and access it. It's supposed to be on</p>
  
  <pre><code> /private/var/mobile/Media/DCIM/100APPLE
  </code></pre>
  
  <p>where 100APPLE can change.</p>
  
  <p>Accessing that folder from the computer is possible, for example using PhoneView (great software from Ecamm). But doing it from the device seems impossible.</p>
  
  <p>Here's the code I use to browse the folder, while searching for that:</p>
  
  <pre><code>NSFileManager *fileManager = [NSFileManager defaultManager];
  NSError *error = nil;
  NSFile *private = @"/private/var/mobile/Media/DCIM/";
  NSLog(@"%@",[fileManager contentsOfDirectoryAtPath:private error:&amp;error]);
  </code></pre>
  
  <p>This code works perfectly, but gives me a null array, when I should have at least "100APPLE". I looked at the PhotoData folder, which contains other pictures. Same story.</p>
  
  <p>I know that if Apple made it "secret" is so that we don't write to it. But since we don't have access to assets library to write, and saving images using the API only savez the image, and no metadata (exif, whatever). And some apps do this.</p>