title: Cocoa: iOS: fopen fails sometimes with error: "Operation not permitted"
body: <p>I have a very weird behaviour in which I sometimes get a "Operation not permitted" error when using fopen in my code, and sometimes everything runs smoothly.</p>
  
  <p>My first thought was a sandbox issue, but in both cases I write the files to the same location. I run only up to 4 fopens before I fclose them, so I don't believe I maxed-out my files descriptors. The next batch of files will always run after the 4 previous ones were fclosed.  </p>
  
  <p>I'm out of ideas how to approach this ambiguous behaviour, and would love to hear what you have in mind.</p>
  
  <p>Thanks,</p>
  
  <p>Nili</p>