title: Can I save files/folders in NSSearchPathDirectory.ApplicationDirectory? NSSearchPathDirectory.DocumentDirectory is not ideal for me
body: <p>iOS 8.4 | Swift 2.1</p>
  
  <p>When I was tried to create a new folder in <code>NSSearchPathDirectory.ApplicationDirectory</code>, I followed with this <strong>error</strong> on device (in simulator it did worked, though):</p>
  
  <p>code:</p>
  
  <pre><code>let docuPath:NSURL = NSURL(fileURLWithPath: NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.ApplicationDirectory, NSSearchPathDomainMask.UserDomainMask, true)[0])
  ConstantsVO.imagePath = docuPath.URLByAppendingPathComponent("imagegallery")
  if !NSFileManager.defaultManager().fileExistsAtPath(ConstantsVO.imagePath.path!)
  {
       do
       {
            try NSFileManager.defaultManager().createDirectoryAtPath(ConstantsVO.imagePath.path!, withIntermediateDirectories: true, attributes: nil)
       }
       catch let error as NSError
       {
            NSLog("\(error.localizedDescription)")
       }
       catch
       {
            print("general error - \(error)", terminator: "\n")
       }
   }
  </code></pre>
  
  <p>error</p>
  
  <blockquote>
    <p>2015-11-02 10:53:21.114 Elmo[218:5055] You don’t have permission to
    save the file “imagegallery” in the folder “Applications”. fatal error:
    'try!' expression unexpectedly raised an error: Error
    Domain=NSCocoaErrorDomain Code=4 "The file “imagegallery” doesn’t
    exist."
    UserInfo={NSURL=file:///var/mobile/Containers/Data/Application/48D90635-0D66-44C2-81CE-F67BAFDA819A/Applications/imagegallery,
    NSFilePath=/var/mobile/Containers/Data/Application/48D90635-0D66-44C2-81CE-F67BAFDA819A/Applications/imagegallery,
    NSUnderlyingError=0x16e7d540 {Error Domain=NSPOSIXErrorDomain Code=2
    "No such file or directory"}}: file
    /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-700.0.59/src/swift/stdlib/public/core/ErrorType.swift,
    line 50</p>
  </blockquote>
  
  <p>However, using <code>NSSearchPathDirectory.DocumentDirectory</code> did worked for me and worked expectedly. But in my application, I've feature to share/import through iTunes, so I have the "<strong><em>Application supports iTunes file sharing</em></strong>" TRUE in my <code>info.plist</code> - this exposed <code>NSSearchPathDirectory.DocumentDirectory</code> in iTunes. I don't want the files/folders that I'm saving through my app to be expose to the user in iTunes. Then where should I save the files/folders yet can able to use file sharing through iTunes by exposing <code>NSSearchPathDirectory.DocumentDirectory</code>?</p>