Created
April 15, 2012 10:04
-
-
Save yeahq/2391659 to your computer and use it in GitHub Desktop.
Downloding zip and extracting in main bundle subdirectory at runtime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://stackoverflow.com/questions/5385480/iphone-downloding-zip-and-extracting-in-main-bundle-subdirectory-at-runtime | |
NSString *filepath = [[NSBundle mainBundle] pathForResource:@"ZipFileName" ofType:@"zip"]; | |
ZipArchive *zipArchive = [[ZipArchive alloc] init]; | |
[zipArchive UnzipOpenFile:filepath Password:@"xxxxxx"]; | |
[zipArchive UnzipFileTo:{pathToDirectory} overWrite:YES]; | |
[zipArchive UnzipCloseFile]; | |
[zipArchive release]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment