1

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.

3
  • Just a correction, a .app is a folder, not a file. Commented Jan 24, 2012 at 13:45
  • 2
    Yes, it's not a file. IMHO "package" would be more precise. Commented Jan 24, 2012 at 13:55
  • Which version of Xcode are you using? Commented Jan 24, 2012 at 14:01

2 Answers 2

9

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.

Sign up to request clarification or add additional context in comments.

3 Comments

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.
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.
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
3

Have a read of the Xcode 4 User Guide which tells you how to do this for iOS and for Mac OS.

enter image description here

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.