title: Unzip Files in iOS
body: <p>I have a .zip folder which contains some images. I want it to unzip into Documents directory in iOS device. I tried with the following link,</p>
  
  <p><a href="https://stackoverflow.com/questions/11333399/download-and-unzip-file-in-ios">download and unzip file in iOS-Stack Overflow</a>
  Here is the code that I tried in my app,</p>
  
  <pre><code>NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
                                                       NSUserDomainMask,
                                                       YES);
  
  NSString *documentsDirectory = [paths objectAtIndex:0];
  
  NSString *filepath = [documentsDirectory stringByAppendingPathComponent:@"Obj.zip"];
  ZipArchive *zipArchive = [[ZipArchive alloc] init];
  [zipArchive UnzipOpenFile:filepath Password:@""];
  [zipArchive UnzipFileTo:[documentsDirectory stringByAppendingPathComponent:@"Obj"] overWrite:YES];
  [zipArchive UnzipCloseFile];
  </code></pre>
  
  <p>And then I printed the all files in <code>Document Directory</code>, but the <code>Obj.zip</code> is the only file(Obj.zip is the file that wants to unzip) that exist in the Documents Directory. How can I done this?</p>
  
  <p>Thanks in Advance!</p>