title: How to get URL for application's document directory iPhone
body: <p>This code is a part of Core Data. The URLsForDirectory....method does not run on iOS &lt; 4 so I need to know some other methods/objects to call. I would also appriciate documentation for future reference. Thank you</p>
  
  <pre><code>/**
   Returns the URL to the application's Documents directory.
  */
  - (NSURL *)applicationDocumentsDirectory
  {
      return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
  }
  </code></pre>