Skip to content

Instantly share code, notes, and snippets.

@arielelkin
Created June 29, 2012 10:02
Show Gist options
  • Save arielelkin/3017033 to your computer and use it in GitHub Desktop.
Save arielelkin/3017033 to your computer and use it in GitHub Desktop.
unzipping an embedded tune pack
-(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