This post walks through the steps to export a macOS .app from Xcode and prepare it for sharing.

Export from Xcode

  1. In Xcode, go to Product > Archive.
  2. In the Organizer window, select your archive and click the Distribute App button on the right.
  3. In the dialog that appears, choose Custom > Copy App. This option exports a signed .app into a folder.
  4. Select an export location and click Next. Xcode will export a folder containing the runnable .app file.

To ensure the .app can be opened on other Macs, it’s a good idea to apply an ad-hoc signature before distribution:

# 1. Locate your .app file (e.g., inside DerivedData)
# 2. Run forced signing in terminal
codesign --force --deep --sign - /path/to/YourApp.app

This command applies an ad-hoc signature (the - flag means self-signing) and does not require a paid Apple Developer account.

Package as ZIP

Once signed, compress the .app into a .zip file for uploading to GitHub or sharing:

zip -r YourApp.zip YourApp.app