I have a cocoa project and I would like to create .app package for that. Maybe it's a silly question but I was unable figure it out.
-
Just a correction, a .app is a folder, not a file.Richard J. Ross III– Richard J. Ross III2012-01-24 13:45:46 +00:00Commented Jan 24, 2012 at 13:45
-
2Yes, it's not a file. IMHO "package" would be more precise.Centurion– Centurion2012-01-24 13:55:20 +00:00Commented Jan 24, 2012 at 13:55
-
Which version of Xcode are you using?Johan Karlsson– Johan Karlsson2012-01-24 14:01:52 +00:00Commented Jan 24, 2012 at 14:01
Add a comment
|
2 Answers
In Xcode, in the menu bar. Product->Archive When that is done it should take you to the Organiser (with the new archive selected), select share, and you can export it to the format you choose.
3 Comments
Centurion
Thanks. One more question, how to preserver folder tree structure? I have added 3rd party program folder with inner folders. The program is written in java and I'm running it through system() call to shell script. However, all stuff is placed in resources folder, in .app package, and the 3rd party program cannot find it's own files, because it's looking for folder tree structure and not flat structure.
Amit Shah
When dragging the files into Xcode a popup appears, you need to make sure it is checked to copy directory stucture, rather than create groups (default). Sorry I can't remember the wording exactly.
Centurion
Superb. It appears I have copied the files with "create groups" instead of "create folder references", so everything all files were flat placed in resources folder. Alter re-copying them with right checkbox I was able to call the required shell script and other lib files. Thanks
Have a read of the Xcode 4 User Guide which tells you how to do this for iOS and for Mac OS.

It also tells you a lot of other stuff that you'll find useful as well.