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.

Community
  • 1
  • 1
Curnelious
  • 1
  • 16
  • 76
  • 150

1 Answers1

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.

mensasnem
  • 33
  • 6
  • 2
    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. – mensasnem Jan 24 '15 at 03:53
  • 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. – SimonKravis Mar 04 '21 at 05:09