{"id":631,"date":"2026-08-31T17:50:09","date_gmt":"2026-08-31T09:50:09","guid":{"rendered":"https:\/\/blog.bexonbai.com\/?p=631"},"modified":"2026-08-31T17:50:58","modified_gmt":"2026-08-31T09:50:58","slug":"packaging-mac-app","status":"publish","type":"post","link":"https:\/\/blog.bexonbai.com\/?p=631","title":{"rendered":"Packaging Mac App"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This post walks through the steps to export a macOS <code>.app<\/code> from Xcode and prepare it for sharing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Export from Xcode<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In Xcode, go to <strong>Product > Archive<\/strong>.<\/li>\n\n\n\n<li>In the Organizer window, select your archive and click the <strong>Distribute App<\/strong> button on the right.<\/li>\n\n\n\n<li>In the dialog that appears, choose <strong>Custom > Copy App<\/strong>. This option exports a signed <code>.app<\/code> into a folder.<\/li>\n\n\n\n<li>Select an export location and click <strong>Next<\/strong>. Xcode will export a folder containing the runnable <code>.app<\/code> file.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Ad-Hoc Signing (Recommended)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To ensure the <code>.app<\/code> can be opened on other Macs, it\u2019s a good idea to apply an ad-hoc signature before distribution:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># 1. Locate your .app file (e.g., inside DerivedData)\n# 2. Run forced signing in terminal\ncodesign --force --deep --sign - \/path\/to\/YourApp.app\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command applies an ad-hoc signature (the <code>-<\/code> flag means self-signing) and does <strong>not<\/strong> require a paid Apple Developer account.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Check Signature<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>codesign -dvvv \/path\/to\/YourApp.app\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Package as ZIP<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once signed, compress the <code>.app<\/code> into a <code>.zip<\/code> file for uploading to GitHub or sharing:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>zip -r YourApp.zip YourApp.app<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post walks through the steps to export a macOS .ap [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[9],"class_list":["post-631","post","type-post","status-publish","format-standard","hentry","category-develop","tag-develop"],"_links":{"self":[{"href":"https:\/\/blog.bexonbai.com\/index.php?rest_route=\/wp\/v2\/posts\/631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bexonbai.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bexonbai.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bexonbai.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bexonbai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=631"}],"version-history":[{"count":1,"href":"https:\/\/blog.bexonbai.com\/index.php?rest_route=\/wp\/v2\/posts\/631\/revisions"}],"predecessor-version":[{"id":632,"href":"https:\/\/blog.bexonbai.com\/index.php?rest_route=\/wp\/v2\/posts\/631\/revisions\/632"}],"wp:attachment":[{"href":"https:\/\/blog.bexonbai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bexonbai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bexonbai.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}