I run zip utility from my app to create archive. Code similar to the following:
NSString *toolPath = @"/usr/bin/zip";
NSTask *task = [[[NSTask alloc] init] autorelease];
[task setLaunchPath:toolPath];
[task setArguments:arguments];
[task launch];
, where arguments it is typically string with paths to files. However, when need to create a password protected archive (with the -e argument), password is entered after the launch, and two times. In terminal it looks like this:
$ zip -e archive.zip file_to_archive.txt
Enter password:
Verify password:
How do I make enter a password in the app?