Reputation: 7286
I make a cocoa program,I want to unzip .app all files to a path use objective-c ,How do I do ? Thank you for any idea.
Upvotes: 0
Views: 779
Reputation: 18253
As mentioned by others, a .app file is just a directory (also known as a bundle), so there is nothing to unzip there.
If you want to see it, right click the app icon in the Finder, then choose "Show Package Contents" from the menu.
From Objective-C you can access the files within the app bundle as normal files.
And of course, if you are comfortable with the Terminal, you can peek into the structure from there. Open Terminal and try something like this:
$ cd /Applications
# The following line will show all apps:
$ ls -l
# Change directory to get into the bundle (any app will do)
$ cd Safari.app
$ cd Contents
# Have a look:
$ ls -l
Upvotes: 2
Reputation: 128
NSWorkspace would allow you to launch .app's - if "launching" is what you mean with "opening".
Upvotes: 2
Reputation: 1076
You can open .app file directly by double clicking on it,I cannot understand what's so difficult about it.. Or you are trying to ask something else.
Upvotes: 0