I would like to export a ZIP file it is a sound file.
Then I would like to control this sound file using Push Notification.
When I load the sound file directly into Xcode it works. However, I export the file using a ZIP file it does not find the file?
As if he then does not find the file? What am I doing wrong?
I suspect the error is here: toDestination:@""
https://github.com/soffes/ssziparchive
- (IBAction)sound_ko:(id)sender {
//File check...
NSBundle *mainBundle = [NSBundle mainBundle];
NSString *myFile = [mainBundle pathForResource: @"KO" ofType: @"zip"];
BOOL fileExists2 = [[NSFileManager defaultManager] fileExistsAtPath:myFile];
if (fileExists2 == NO){
NSLog(@"DOESNT Exist!");
} else {
NSLog(@"DOES Exist!");
}
//Unzip File
if( [SSZipArchive unzipFileAtPath:myFile toDestination:@""] != NO ) {
NSLog(@"Dilip Success");
}else{
NSLog(@"Dilip Error");
}
}