Created
June 29, 2012 10:02
-
-
Save arielelkin/3017033 to your computer and use it in GitHub Desktop.
unzipping an embedded tune pack
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
-(void)unzipEmbeddedPack{ | |
NSString *embeddedPackPath = [NSString stringWithFormat:@"%@/packName.zip", [[NSBundle mainBundle] resourcePath]]; | |
ZipArchive *za = [[ZipArchive alloc] init]; | |
[za UnzipOpenFile:embeddedPackPath Password:@"abf26a4849e5d97882fcdce5757ae6028281192a"]; | |
//make sure to unzip to tune packs on disk | |
NSError *deleteError = nil; | |
[[NSFileManager defaultManager] removeItemAtPath:embeddedPackPath error:&deleteError]; | |
if(deleteError != nil) NSLog(@"error deleting: %@", deleteError); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment