title: iOS8 Document directory path
body: <p>Issue in <code>iOS8 document directory</code> path detection:</p>
  
  <ol>
  <li><p>Am using following code to store downloaded attachments from my app into <code>documents directory</code> path.</p>
  
  <pre><code>//-- Store data to documents folder
  NSString *resourceDocPath = [[NSString alloc] initWithString:[ [[[NSBundle mainBundle] resourcePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"Documents"]];
  NSString *filePath = [resourceDocPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@",fileName]];
  [self.downloadedMutableData writeToFile:filePath atomically:YES];
  </code></pre></li>
  <li><p>Using following code to retrieve document form path</p>
  
  <pre><code>NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString *documentsDirectory = [paths objectAtIndex:0];
  </code></pre>
  
  <ul>
  <li>Everything works fine in <code>ios7</code> simulator &amp; device.</li>
  <li>But its not locating correct path in <code>ios8</code> device &amp; also in simulator too.</li>
  <li>Please anybody help to store &amp; retrieve a document in <code>ios8</code>.</li>
  </ul></li>
  </ol>