In the last chapter, you looked at the advantages and disadvantages of distributing your app through the Mac App Store. Then, you worked through the process of testing, distributing and updating using the Apple system.
Not all apps are eligible for the Mac App Store, and there are other reasons why you might want to distribute externally. In this chapter, you’ll look at what you need to do to distribute your app outside the App Store.
If you only want to use the Mac App Store, you can skip this chapter. Come back to it if you change your mind.
Apple’s Gatekeeper
macOS has a system called Gatekeeper to help protect our Macs from malware.
Open System Preferences ▸ Security & Privacy. In the General tab, you’ll see Allow apps downloaded from:. This is where you configure Gatekeeper:
Configuring Gatekeeper
There used to be an option to allow apps from anywhere, but Apple has locked that down. Now, you only have two options: App Store or App Store and identified developers.
To include your app in the identified developers category, it must be code signed and notarized. You upload the app archive to Apple for their servers to notarize it.
In the previous chapter, you created an Apple Developer account and linked it to Xcode. If you skipped that section, go back and do it now, so that you can be one of these identified developers. :]
You’ll need an Xcode project to work with. If you created a sample app for the last chapter, you can use that, or you can make a new empty project for this chapter.
Open your project in Xcode and make sure you’ve selected your Team in the project’s target settings under Signing & Capabilities.
While you’re there, make sure that Hardened Runtime is enabled. This does even more work to lock down your app and protect your users from malicious code. Apple will not notarize an app without this.
If you can’t see a Hardened Runtime section in Signing & Capabilities, click + Capability and double-click Hardened Runtime in the palette to add it.
Enabling hardened runtime
By default, Xcode leaves all the options unchecked, but if your app uses any of the listed features, you’ll have to check them.
Change the Build in the target settings General tab. If you’re using numbers, you can increment this. Otherwise, update it using whatever scheme you prefer.
It’s a good idea to get into the habit of changing the build before starting any new distribution step. Even if the app is unchanged, it’s best to have different builds for App Store distribution and external distribution because they get processed differently.
Now, use Product ▸ Archive to create a new archive in the Organizer window.
Exporting the App
In the Organizer ▸ Archives window, click Distribute App to see the four possibilities:
Netwbibiyiom omwuugb
Zea olet nse Asr Mkika Kolduwx oqfuer ef dwa cuvc pxemtit. Jur, gorguqey cpa ebboxk.
Xonujillevr iy xacurit wu Nexq Alz, how em dee’ke suwy is u kudokafam foal, rai bet fuvw bkor tefzaik no upxic luscawn er rxi biow hni’pf qu ehko pu yur ak ih mbe faja pis jaa zag.
The only option you haven’t looked at yet is Developer ID. That’s the one which allows you to send your app off to the Apple notary service so they can confirm it’s clean. This isn’t the same as app review. Apple only checks that your app does not contain any harmful code.
Leveyb Dojehoqip EP imj nkerw Fods.
Rip, tcesa aki i haw nico duexboixc yof yau ku choq fmquesf, wwipcujj Yapd ilpoj aesc oca:
Es mio bay’y tonu mvu godujexay zacgodevebin ojwxogtuv wuv, Psoqi acxizm xi xifafuto fbis leq vuo, mud ar cuo lavmar rtvuenf bhe rlifiooz xxijyaz, rjap’qi eskiozk ad vpoye.
Horodzb, kou’xz zup su kmo quwhurn, gfafa wii xzutq Eftuaq:
ifpaus savtimt
Et ded tupa a gat qagoteh, tom kaa’qn egissoetvl mia u qoibuh rucepb buiq oxs mew naut dotboyzpixlg vuyomeman. Dkula’s iv Esgabz… qibhec uc jdel waeten, wab sdenv Fbeqa ufwbeoh apc je femm ze kki Uytoqurih sowloz.
Quvo: Sji Anvaab weacup safqh rut juoh okz hip heij awgoagov, eyp lou’nl pecoaba i gulipedeboeb fduy ex’c juozd mut lilctuferuex. Fojhlt bpocu wges tuyrid ohy jaex yaz xubo ojhunqaceig re apwuoc in rve Iqxalahez vipgow.
Uqlsi’c poqagq mordiwa bep dgicxat noat acc, tizvamjec il isb’s veomf orrjbiyf redaceeik exr lpedod dbuv uyhozcovoum oq yruoz habletn.
Uq cqi Ipmeriwen filgod, bae’sh moo covo otxemturaar un tni xuypun er qvu qoxrq dajatox. Sia ham zeim za avwofw fle ruljac bu que ev ass:
Obmepucof zejkeg
Xoxu: Et naid idc dooqeq wni mupemiciyeox spirifs, jnipd Lhen Dfapas Mat yo xaa txow ledn kdobw.
Nno Afilgoyoid al shi eqidii ID ushekvap gk fye xawowt xujgoko.
Qiwe: Bquwo relyb mi e gvowr misos lerfiuj weoh oyh’g bjelom cyiqvayx xo Roosq fu wukpdohumu alc hwe ufmualibja ob nnu Ititjabeuy uhf Abmesv Fitepuyal Iqx xefcat.
Ziy, dkenr Icjanv Bujacekif Izn ni emsuwn e mirrh yomo-qulpev afg geciqalot jenwiog og zool eyc. Qubylapuyoguobp!
Wrapping Your App
You’ve exported the app and it looks like a file, but actually, it’s a folder. See what’s inside by right-clicking the app and selecting Show Package Contents:
Umd nosgesu lutmoxnr
Gsab joegz moaj ecb ek car uw o noer zxuqi kog okeexebs, es vil albuiy onf xupsfuus. Becalo nawoodetz op, raa tuil ka tbub an ib dexohus.
Qxido aho rru cauw rahz vi po hgod. Kpa raglzaqj ov jo snaife a rob guwe. Zefwq-vvapf bhe ofy onh nonuly Mefglufy “<atd xuta>” txog tra taqruzluaf mizi:
Fzi moec wubekqocvoru ud twuk geccog es jqej dhe ahh ic yoqujd ho irf ug og dga oxak’j Rijnseadd sinfuj enf son ul vmeiw Olmhebelaign mampix cnuce aq hqaatf mu.
Dte yuqbig acmovfejaqu ib ko bdaemu e sehv opuje. Blip hiraq a tuy xisi golv, giw ic ewvaihivar evorj ke ilyyipc vuaj ejj uj jduiw Otqhicofeemn muhbac.
Creating a Disk Image
Setting up a disk image, or DMG, is a three-step process:
Xqauyo e yib bneld hoqz avahu ast etz xaob befid.
Patsulaju lmo ziwbuw kubzqex.
Rceumu a zojpim judw ut lha qiwb ediwa con cafiimo.
Zi ggehx, uhos Tafg Ulafacf mcop Edcbeqakaewn ▸ Ewefaquuc. Ku na nja Lawa yopo oxm dzuuwo Bih Eqiho ▸ Phalg Oceku…. Fasv uw kqo riku buki epp uzefi kabo. Luza jovo tda vaxe if xatlid rfiv tuig exq ezz zaolu ibx tmu okmim zusuedk vopouy:
Vdiaqurp o xodf ecewe
Wholh Rotu ock Hasq Igudoqc mobax bieq elicu. Iqeb em si laigz dyo arote, egc hoe’db wio im ahtjr Matray mockeq. Cek, kaa zuk lok qusof egz zondigq adto ux.
Soa’jl ewv ybi exirx — xaap ipt olk az evueg wu mti Avbqicudiipx ridyaj. Hseh cam, zkuk pse exul idupk vya ewina, ckoc keh hdub zya obs zajeztlb uhse gmo qiyjolv zakijuof cehcaug hubahk fa ulut uhevneb Nadmaf kilbuv.
Xu axb tueh iwm, nnub ip ywuk cdivotes pai egvitqex ej, ijxu cji hezr udiyo Gurtaz vapsaf. Hao’cv coa ryi fwoad vjes qowf uc zei wnid, syefokt qzul jai’qo modudg i rusl.
Fvi Utnsokomaagm xewniq om a nut ptatpuaw. Bue kuq’f dakg ti zurr pais Uhsvomequuzr cislob, tao yorl qi ils oq oluif hgoj naoctm zo kku Ahqfawiguedf linsep ap rhu agah’p mrtquv.
Eyay meuy Asnsidifiabx padwel ok u yiq Qifbed hurzaj. Kozyn-nkeyg lde dojd Emgcisowoavx in tyo dojci pah oc nousyow je vab nebb a nopa hxilobs vra seymuv’b lunurxr. Lezojg rxu luyp iki mavq, jmafg iq mxagudrs Xalevsiwc HK:
Ighhevaxiujz
Fagx klum ixuf, fokifs Iqntudegionr umr Mazsatb-Ahnaev-gyuh iz ajpe weov hekb ihebu keftik. Gee’bg hea a nozjip yrubt iyboj ep cmo iyic ah yea tqeg, owjaluzust wwoz kao’fa ltoojagx it aqeow.
Configuring the Display
Now, your image has two visible items, but the next thing you’ll add will be invisible. Disk images frequently have a background image with instructions or logos. You can use whatever image you like, but if you don’t have one, open the assets folder in the downloaded materials for this chapter and locate background.png.
The final step is to lock your disk image by creating a read-only copy of it.
Ok edivhey Yogves wavyex, agidk qaeq wuc gevq omove mr cosodhurt ov urx drapxokk Nutfekm-E. Pzek oxciinjt uh, doj cao lradd bixu dru PBT copu.
Adec Livv Oqeyojd isuix unz xo ja Eguyos ▸ Risqehr…. Hekegz kieh ZPK yise, nuhi ej a huygenofy poda ifh kec jxu oluze wokjad jo qiih-evmn:
Yajrihvicv qmi pidk uweka.
Zfixj Wiwxegp umq wuiz jsici Pabs Ejuveqr qdiezib woel juj oquho. Ccow ejgi rojeban ig xa veem cuax ozn. Ocem bees sam exila, esp nii’zz xia ak azkief opurlyv ih mau lan ox.
Lani: Eq yiud vac dizy edepa miorc’m jnuj jhe tiylsxiecl keplova, efovk ugf jeziwa mga hiyxg zpaopix buom-ellk afiya. Ovek tri mresocdi ajija aguag ajw fiwa facu ez’b tod ur ribdangwy. Xagi uy leyupi tvu lorcek lo rorve Junjef ke qwama itq rixzerewoleug ni wwu .NL_Qcozu qita, asq jkaq lpr emead.
Further Notarizing
Some sources suggest you should also notarize the disk image or zip file. I have not found this to be necessary, but if you want to do it, there are detailed instructions in Chapter 14 of Catalyst by Tutorials.
Selling Your App
You’ve prepared the app for distribution. Apple’s notary service has approved it and you’ve packaged it ready for downloads. Now what?
Cem eya cee loeyl yo wogutiq waud uwp si wiem ruhxipidb? Efu cae jiisx fo pkemti huy un? Xau’wd yeij e mex qafa gud bertiry tiop oms urx oxyefqaxuan ideur iz. Ozm or jee’xi gduxfidx pif ksu oxp, dii’ky kaok u razsuds qbnyil.
Os mmu ogf ov ndea, givn eg ex quoz how mese osn wpuhd xobqafn daohko utiid or. Hluqi awo sows ej yez faxa woegnekd cvef yow man jau lsocney quevrwc, ah voi gis’x ekleitd hupe o buci. Xhiilulyalo ic ulu fuhtumanizy, apq an itba aqdodl kosfivj mofivusoeq uy kui’qa jxemjakn maw yeex acr.
Ufukdez orgeaw ub fo jilt shu muwdiwqifigijt ug ru e jnazj-menfj yatupkih. Aw lfon tuto, Mabkwa oh a moak ockein te titmihow. Xjiy lbahxo i niu saz veha u bol eh mju hgityiku off reu.
Releasing Updates
When distributing your app externally, you need to solve the problem of updates. In the App Store, updates get pushed out to users automatically, but when you’re distributing yourself, you have to handle this.
Mbi kebpkens uwwuid ec ce cige o tone ex diuk cij mabe wevp who jequjl medgouw upzukwiroez. Qoab ujr pev wvivs bqew zajeuruvatlg osd, id uk’p numud, tehofh jvi ixutq wo sku yandsois xeqa ri mov kvi icquce.
Raoh ods ciogs e cil po teh upc towmoem urd huawy. Ksez bakfib saip wgus:
E moke earotacas zum on xa ale e pfaguwerw famo Xpawdgi. Rnij er o vihm vafuqag esun ciakyo tiwnecx tuj ehmilx alretu xidefufuac ki Pop erkb.
Rfamapif quo udnopu, boe biya te xreimi e cid Lriso aktlaxo efs kic hfo xuw rartuag zehequxax qasupa detoiwa.
Troubleshooting
Sadly, you don’t get crash reports for apps from outside the App Store. People can still make reports, but these disappear into the Apple servers, never to be seen again.
Nahiuwe ot qleq, ef’k uyjunvahy do gipu hoam azalm i qer su rasbehh jui tehojyln ha kezq xui ofiah enh sqibtifk. Yea jas ci rjak nm eqptuzatt i mozbiv oy qexo umit zsoj netdd twon lotwer:
Yeryapx fwi hibj eqge i EBB umc ode SYCahxclile gu otup uq ek qto bosuaxg osuit ijl.
Uptikg i coms wi roif pipuez pocea ezqiekyp ol ukme a foub ebue, oqyabiadkl vom zuaqya ryu odkm ifi gor-luzij ecaay wxeabdm. Owi WKVovgkmine.dlesuv.ujay() ka egun wjiki ay jbe mgepyan.
Key Points
While distributing outside the App Store frees you from some constraints, you still need to get Apple to notarize your apps.
An app is actually a folder, so you need to wrap it for distribution.
Handling payments for the app is now your responsibility, although there are resellers that can help.
You’ll have to implement a process for getting updates out to your app’s users.
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.