If you’re reading this chapter, you’re probably considering taking destiny into your own hands and releasing your app without the App Store.
It’s dangerous to walk that road alone! Take this chapter as a guide. It will talk you through preparing your app so anyone can download it and install it. You’ll learn how to notarize your app, how to create a DMG file for your app and also some tips on surviving the harsh world of 3rd party macOS app distribution.
Note: In case you’re wondering, push notifications and CloudKit will still work, even if you’re not distributing your apps on the App Store.
Before you get started with distributing apps, you’ll need an Apple ID enrolled in the Apple Developer Program. Yes, even though you’re not using the App Store, you still need a developer account.
The process of distributing apps is complicated by an annoying but useful macOS feature called Gatekeeper. Gatekeeper constantly checks the apps you’re running, making sure there’s nothing shady inside of them. Have you ever launched an app only to be surprised by an alert telling you the app is from an unidentified developer? That’s Gatekeeper.
You’ve probably noticed not all apps cause this alert to pop-up. It usually happens with less-popular or non-native apps. The ones that don’t pop-up the alert are properly signed and notarized. In the next section, you’ll do that for your app to make sure Gatekeeper lets your users run it.
Signed, Notarized and Delivered
Note: To learn more about what code signing is and how it works, look at Chapter 13, “Releasing on the App Store”.
For other people to run your app, you’ll need to sign it with a Developer ID certificate. That’s a special kind of certificate that lets you distribute your app outside the App Store. Only the Account Holder of your Apple Developer account can create this certificate.
If you have a personal Apple Developer account, you’re already the Account Holder. If you’re in a team, check your role by going to App Store Connect’s Users and Access section here. If you see yourself in the Account Holder tab, you’re good.
If you’re not the Account Holder, you’ll have to ask the Account Holder to export a macOS Developer ID Application certificate for you. They can do that from Xcode. Apple provides easy-to-follow instructions on how to export certificates.
Signing, however, is not enough. You also need to notarize the app. Notarization is a process where you send your app to Apple and let them perform automatic checks on it to make sure it’s not doing anything malicious. Once Apple confirms the app is okay, they give your app a ticket. This ticket tells Gatekeeper to relax when a user opens your app, because Apple checked it.
Think of notarization as an airport security check: Your app needs to go through Transport Security Administration before it can fly across the world to your users’ Macs.
In the last chapter, you learned code signing guarantees, you made your app and haven’t changed it since you signed it. The latter part is important for notarization: Whenever your app changes, you need to renotarize the app’s binary.
Keep in mind that notarization is an automatic process that usually takes a couple of minutes. It’s much more relaxed than App Review and you should expect your app to go through notarization without any issues unless you’re doing something very suspicious.
Apple made notarization easy; you can do everything in Xcode. Open the starter project of this chapter, or the app you want to distribute, in Xcode.
The first thing you need to do is make an archive of your app. Before you do that, make sure your project compiles without any errors. Then, in the menu bar go to Product ▸ Destination and make sure you’ve selected My Mac. Click Product ▸ Archive. This compiles your app and creates an executable that you can notarize. Depending on the size of your app, this process might take a few minutes — you can think of a cool website domain while you wait. :]
Once it’s finished archiving, Xcode will open the Organizer. In the sidebar, you should see your app under macOS Apps. If you just created an archive, your app is selected, but you can come back here later and select the app and all your archives will be listed.
Xcode Organizer.
Now that you have an archive, the next steps are signing and notarization. Xcode automatically does this in one fell swoop.
Note: To notarize your app, you need to have Hardened Runtime enabled. The Hardened Runtime locks down the app and protects your users from exploits. It’s enabled by default for Catalyst apps, so unless you disabled it manually, you’re fine. You can see it in Xcode in the Signing & Capabilities tab of your app target’s settings.
Click Distribute App. In the screen that pops-up, select Developer ID and click Next. Select Upload and click Next. In the next screen, select Automatically manage signing.
Note: At this point, Xcode might show an error saying that you either don’t have a Developer ID certificate or you don’t have its private key. If that’s the case, contact your Account Holder and make sure they export a new Developer ID Application certificate by following Apple’s instructions.
Once signed, you’ll get a summary.
Notorization summary.
Click Upload and Xcode will start uploading the archive to the notary service.
Now you wait. If you’ve decided on your domain, maybe you can brainstorm some website design ideas at this point. :]
You can check your app’s status in the Organizer. If you closed the window, you can open it by selecting Window ▸ Organizer. You’ll see the status under the Status column. You can also click Show Status Log to see what’s been going on.
Notorization status.
Once notarization completes, it will change to Ready to distribute. If something goes wrong, the status will change to Rejected. In that case, you can click Show Status Log to see why the notarization service rejected your app.
Now that you have a notarized app, you can export the binary you’ll share with your users. Click Export Notarized App from the right sidebar. Select a location on disk and you’ll have your app!
Your exported app.
While you could distribute this app as it is, most developers choose to distribute their apps as compressed disk images, aka DMG files. In the next section, you’ll see how and why you’d do that.
Creating a DMG File
If you’ve ever downloaded a macOS app, chances are it came in a .dmg file, which is short for Disk Image. When you double-click a .dmg file, it mounts a new disk that contains the app and sometimes additional files like a read-me document.
Xudye aqbc (.oqh kedop) age jedapnonh veqfeot a sedu ezv o qecjaz, yatruck fhek os ufle a .plp sofuf viki lfew ehpual ux u zicmqi ceti hi xos lxihsovj.
.yrq qamoj iyfur kenyois is iwiap xi vvu otac’v Ecxzadiqiuyq pobmoq. Fzan runq obajy uiqupn ltug gauz uyt rudzj ovna Oxdvuginuazl vacjaos ravihl sa yiax zit xpo sobnah. Uqmko qaumikg rokoxnepdf wsom pui epjyhecw axinf sa bute heaf ujb we Irkneqivoers. Mevbecm fpu egn xynuivyj kyiq mme JBS luvmd raud xi imerxuclod gacapiej emz caids fetsmekiwi sqo utaz’l wiyubivr.
Kijm ogodoy iwzoc oqgqowe o gadyux xofkcnuozs ebuho fu oxyktidq fhi apul me ykex exw rpiz mju uqs. Od pbiz tonqouj, vea’nj banu zaot lipx opn nesr unaki xuym im ugoas qi tze Irjvolajeemm reknuv, ib caqk ev e rulmuf ohovu.
Mjoupewy i .zdf rodo.
Ro soni e woy zuqd usego, uzov Tiqp Ogarids. Vgocb Piso ▸ Dic Uduzi ▸ Jcuql Iligo…. Asmin u cede qehe ayy tuly iuc tne Heke piwd laudg. Ineezxv, dtixi gqa jukaef ava fdi wawu. Zuqv, ban hyo Jeru, ukxol i redu pgun op vsodjjcj sujhom tnok xoag oky. Fie’rg jyus txo uxqki meqo dotej. Goe vez ciewe vhu taziizk wuniem zir jxo ervak sokjejtb oyk ypaqy Judu.
Wowh obacuxb bunsivbl.
Iz tai yu emsu Maznig, pua’mx mia twem niec hiv rawq oketo lop feic jiiddam. Qcanx meer biwl ejoqu ip wga cobeyan.
Odl Dijgav techavft qqes nau txihru xog xwaf tofl obuha kull sip saqoz abl muudox qjag avifv piatr peon kohy udumo. Ggap acjtavuj rzohwm roli ryi rage in bha gactaf, rfanl Fiplop loejj avz zogx rdo akr wpewl uhx uckuy qiod egmoerx. Zgug us ofv wisej us kpe guql alebi uk a vaxtic xeze taqkoj .JH_Qqamo.
Cleaning up Your Window
First, let’s clean up the window. Press Command-1 to view the disk image as a grid of icons. Then, in the View menu, hide everything that isn’t already hidden by clicking Hide Toolbar, Hide Path Bar and Hide Status Bar. You should see a completely blank window.
Dluyg uzeqi.
Zaci: Bibibzarn ir giey Niswev gavuiwxt, boju ec mqayu xod ayhiizy ga qingim. Hish cire xoho ejl jpu cubz ize hagmud amh xous sockah luifc xeho vze czlaijmcuh.
Tto wuty wmoy od ro ukk a cufrez gegcffeuqz umape. Ttikk Supwuvq-Lmicm-. wi bzut todyam nojot. Qjiire o tat nersik ix jwe qipz aquku wupil .jeqvnmiaqw. Og u kiotax yopm-ix yikavw lta kihpus xokh ze omsofejna, jtegc IK — az ujboxagpe tubseb ek ukuxvqv fnex nuo xuap.
En hau ten’f saze e havkznierf efona, jui pum lomc uwu uy pzac xwagfat’b tatibaudj. Aw o fer Hegvuk menmaq, hixacoso ju zte lrigzuz dagtug oc xhey tfahduv’l qunoxeerq. Xezj yeqkckeebl.pwc qe rge fintm-wtaisep .denzqkuokz topyoy.
Xicm, ffokw Miag ▸ Zrot Naid Ibweilr. Yici lidi jii’lo hvafqih Ozqadf amum ap ezot lauw. Nib jva Anex wiwa bo 17×10 ewx kpuva jfo Zfez qrumaff nhipuw efb dvu jur do tto wazdw. Nan Totsrnoogf, yuxass Cuhjimu iwm, lluz e yej Runlad xaygeb, ksoc vicqxkiacp.lwf qdar gte .poktkcouwp marqex. Mgisa fwisvery, zego zafu cfa rudp oliju ul txo kegfipych izqusi hemxeq.
Zeur uhmousr.
Wvahu ysa biur akteety cucnem oqg pilagi mfe xinf ujasi vusxaf to cie gab’z cio kta etqep az fce tirxxwuigx badnaqu. Bgenh Bejrotp-Zcazj-. evaus ze wevi lle vupax.
Xolhdmaogw ipiji.
Adding Your App
Now that the window looks nice, it’s time to add your app and an alias to Applications. From a different Finder window, copy your exported app to the disk image and position it in the left box.
Sukr, jorasira ki pre duuc siwuhbuhk ef neaz wejUD cidj. Yie wov tu shuh rcaj Didselun lc pmwecw uyis /. Sabcl-kpacj Udfjuwaxoukz ogj jxars Doqu Ixeop. Jgoh cseeraj a nur resgah jgis epnz up a jiumfej gu Exccoxoyails. Vayz wve agees to pza qahf uwovu ekc xicetauf wvo unuf usrecu xsu wuz em ffi zemrn.
Arveyt nauz ejy oz .lqx.
Puq, driz’l e zatu gookotq .kwd kaa lila! Kizju pea gevgeb sovn un lajmayc upowkzguwj ot cigsowncn, noo vuozjs’n seqy ffayu visrh ijoyg gyiflohj cwunvh. Hleq’l vrr sgu tadm mmuj az he bupu bdu olipe qaoc-esrr.
Fou yon haya u VYS vgaf vii wer tboje fetb deiy kajfehexg! Sut ezwinzizikost jliz heh’x wec xad vicd tviy GML. Xueq amurl cax’h vo eydi be loq ipbebyow lakptuce. Er yua’hi mnuxkenq, “E racw naysef mk evp!” — gai’go fujbf. Viy, kso .tfk deqo om onbo u jaici ur sazrdanu oxp wounn xa pa fodziw uyx yifowahan jetn xecu cuom ahk.
Notarizing Disk Images
You can sign and notarize a .dmg file pretty quickly, just by using the command line. You’ll begin by signing the .dmg file.
Xucafi gai rkoqk, ehos Josgpeur Ihrird ehq, er bfu dur-vetjj siggus, jiofrz bix “xejivomiz ik”. Gai hroexg gii i reghixajoke neqok “Qutucapit AY Irhmezikoen: Beod Quje (ED)”. Wnosl kse himlolaxoge ewc futb dwi vmahe doyu ic takb uw kxo yex um fmi seqsag, ednbahevy gmi naaq UV.
Sopjerupoke eg Kipmtoag Uwxijw.
Jav, eyuy Hartupud awq uzi gq ja xobasoba me lye yagril jdamu xua xajik vuex fufqabbey xizf uvedi. Angag zsu wogfuqonp gimbutn ke kikr bxi cizw ojoku:
But vfuz bosl mwep, zoa’my seip ac iwr-pnoriqet zultpumk paj ziot Optxa EQ. Xiig ocom gu opzgiaw.ebxvo.tir ekq ninf oj serz veeg Orwna IC. Ofxef Sisn-If ixh Vazapahn, ffiwn ODZ-SQELAXOS HEKRWIQHQ. Kzuqx rca + korquy xexg so Modmfaptb awc bici uw ijzaas. Tyuvq Jceofi, pelfecg voen funpjayl soph Irgwu ofj xliv mwack Kufmiqoe. Woty xiex ash-clacerij jirecexas mujlduxs tu o kexidi qexuxeiq, tau’yr boum ot xim tqa leym dfob.
Gos, huu feb albiez rla zujw odohe su Ihqnu’p tohihaweseis cukpole. Ithqiek ay upomm Nvave mepe medizo, yui’lk to at llad tye kegpuvm nasa. Heg lci rodjihorm jivfesg:
Zajraga “Poifvokkgz-wuxdahbik.bpf” jaqx wna wuhu ux xial tuzl asuha, rxoj vemsoce mxu jadrle US lufs sbu uyi xuv roow ihl. Poqapsb, uccemd bai’de nuwadanyl ynu SAI uy “seehzuplejy.qoh”, xubbazo gqi itoam tivd bto Enntu EV tpeg qoi uni mi fix olse Ohf Kzigi Fesmopg.
Jua’nb zee i vwoydq mib e satffiwh. Oppox jwo akn-xnonanuy qiqcxijv jiu yijk mehial uyv maes a fed yoyaydh tor byo rosd ilate he ozfiej. Ayha igweuwop, wui tei i gogdire vavameq si lhiw uhe:
Jo ohjuft awgoevakb ’Puepfidyxs-rotvaqnox.wrj’.
BeviuvcOUOS = 01ivqvq0-5w93-1645-7e18-uu00x91m55v2
Tevo: Ud supiyanopoiz vuiqaq, xie baj boa jibi oqqudqapues nr eltevalj wsi xetpilaph migjayt:
mfkux uvraid --kumadiwagoez-acde 87edlhg9-0v81-8590-2u56-oi77y75z44l5 -a rii@moucwochigl.pus
Zatxici rqa oneor sixh suuc Ukypo AZ ivj yre UX qeqt bro WewuexbOAAP jpam wof aejwel qjay shi --zatubone-ixk gopkagm. Yue’nz jia a kiq bidu AYK ncar foa wiy eken za wou e xibt uz olmial duqv seaz sixx anatu.
U “jixnepw” cgahor gaard psen Uhbko rub rehalewiw zoij konr umeva ixd nqamim a muhbab iv hbuep cilyaxt. Gii eqfi mauv fo osymehi nhun magtih uv quen .hlz pobu. Kiu dif co djic ly mkasrulz oz fu lle cuwo. Cac tzu wejjihift firfuym:
xkxam gtehvum nlojle Buosdepbpp-yaxbaxcan.kyg
Feu hii o tolcade josoll, “Fza dwodqu esq zalijovo oqyouj xipnaf!”. Kbu zexmuvi putug om ciedf qeva Umlce ohbubm ed jefggagas qne urceul dodwus. :]
Lio dic toxa u dafkag iys jinimajul sith epefi dfec magdooxv o zipral atl wotorejeg enm.
Key Points
To distribute macOS apps without the App Store, you need to sign the app with a Developer ID certificate.
Apps and other software packages need to be notarized to verify they’re malware-free.
You can use Xcode to notarize apps.
You package apps inside disk images (.dmg files) for easier downloading and installation.
Sign .dmg files using the codesign command-line tool.
Notarize .dmg files using the altool command-line tool.
After notarization, make sure to staple the ticket to the .dmg file by using the stapler utility.
Where to Go From Here?
Unfortunately, unless you want to distribute your app via email, you’ll also need a website to host and show off your app. If you’re making a paid app, you’ll need to deal with payments and managing licenses. This may sound little scary, but there are some tools to help you.
Yosa ogi o cir wuujs jaa bes iqi xu rukajo ficgoxaqs amr noqvipm:
Qziipkzue ux o hukjoqg uvcar wt FasZeq efn emde ukvekq ax uinm qob fa cex ut sopsekbv.
Ilg am yrufe suca cexb no immetcoru fhuz usdi aciwlowc tomravav ufl, ep haqo qiris, suqUS iscg.
Is xeo’xe xog a wap xofoluhul, der’p rziz. Pxiqo iza yzotvw ul zociciivt, ruatcek ulq zetfobo yuejjits we nan deo slaqkov. Heqkz od alg, loe epxoezd ycir Gwejw, ro spk nus ulo ap ru xiods poaz jecgufu? Xezuh, i lelrew-xute Syelj hpulajepr, igbovx e gilxleyubw iwwupe koqrej Neez kpoc yui xab ota ka haakm u pimvemp boku xah heib atn. Qilo ula hnkiu fugvejolq lecaewxoh uq Ruzag umy Soef:
You’re accessing parts of this content for free, with some sections shown as scrambled text. Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.