{"id":2466,"date":"2022-08-30T15:25:06","date_gmt":"2022-08-30T15:25:06","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/01\/17\/iphone-downloding-zip-and-extracting-in-main-bundle-subdirectory-at-runtime-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:25:06","modified_gmt":"2022-08-30T15:25:06","slug":"iphone-downloding-zip-and-extracting-in-main-bundle-subdirectory-at-runtime-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/iphone-downloding-zip-and-extracting-in-main-bundle-subdirectory-at-runtime-collection-of-common-programming-errors\/","title":{"rendered":"iPhone: Downloding zip and extracting in main bundle subdirectory at runtime-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;ve used ZipArchive with success in the past.<\/p>\n<p>It&#8217;s pretty ligthweight and simple to use, supports password protection, multiple files inside a ZIP, as well as compress &amp; decompress.<\/p>\n<p>The basic usage is:<\/p>\n<pre><code>NSString *filepath = [[NSBundle mainBundle] pathForResource:@\"ZipFileName\" ofType:@\"zip\"];\nZipArchive *zipArchive = [[ZipArchive alloc] init];\n[zipArchive UnzipOpenFile:filepath Password:@\"xxxxxx\"];\n[zipArchive UnzipFileTo:{pathToDirectory} overWrite:YES];\n[zipArchive UnzipCloseFile];\n[zipArchive release];\n<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2014-01-17 07:09:15. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve used ZipArchive with success in the past. It&#8217;s pretty ligthweight and simple to use, supports password protection, multiple files inside a ZIP, as well as compress &amp; decompress. The basic usage is: NSString *filepath = [[NSBundle mainBundle] pathForResource:@&#8221;ZipFileName&#8221; ofType:@&#8221;zip&#8221;]; ZipArchive *zipArchive = [[ZipArchive alloc] init]; [zipArchive UnzipOpenFile:filepath Password:@&#8221;xxxxxx&#8221;]; [zipArchive UnzipFileTo:{pathToDirectory} overWrite:YES]; [zipArchive UnzipCloseFile]; [zipArchive [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2466","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2466","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2466"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2466\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}