1

I had created a mac app in Xcode, and i would like to create a file out of it , so that it will be a regular program on my mac, which i can run on startup , and send to other people. I don't know if it has to be a .dmg , , or something else.

I have tried this link to do that, but the dmg is just a file that when i open, shows me the Xcode project and not run the app as like any other mac app : Creating a .DMG (dbf answer and marc answer)

How do you create an app? a regular mac app from Xcode project ?? How do enable it to be open at startup as like any other app ?

EDIT I can see lots of people just taking the .app from Xcode, to use as the desktop app . but for me, when i click this file .app . nothing is happens, (it open and than closed)

Thanks.

2
  • Yes, you simply take the .app file. If that does not work open Console.app and see if you can find some hints to why the app did immediately close. Commented Jun 9, 2014 at 9:05
  • how can i do that with the console ? Commented Jun 9, 2014 at 9:08

1 Answer 1

2
  1. Open your project in Xcode.
  2. In the "Products" folder on the left-hand side of the Xcode window, select .app
  3. In the "Product" menu, select "Archive."
  4. When Xcode has finished building your project, the Archive window will open.
  5. On the right, near the top is an "Export..." button. Click it.
  6. You have several options for creating your Archive. The last one is: Export as a Mac Application. That option will simply save your project as an ordinary Mac application. Click it.
  7. You'll then be presented with a dialog in which you can select the destination folder for your application. Choose where you want your application saved, and click "Export."
  8. In the "Finder" go to the same folder you just selected and your application will be there.

~~

To make your application open when you log into your account on your computer, open "System Preferences," select "Users & Groups," select the "Login Items" tab, click on the "+" button, find your application, click on the "Add" button.

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

2 Comments

BTW, I would have never figured this out on my own as it is not at all obvious or intuitive. I would have never guessed that I needed to make an archive and then export the archive.
In XCode 12.3 you may need to exclude the arm64 architecture to avoid Build Failed message. Options from the Archive screen are Distribute App and Validate App. The Distribute App option has a radio button for Copy App which generates a copy of the app, which can then be packaged into a .dmg file for download.

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.