<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Jacob’s Tech Tavern]]></title><description><![CDATA[Learn advanced concurrency, agentic iOS engineering, and Swift performance for 10 minutes a week.

New subscribers get a free eBook: The Complete Swift Concurrency Toolkit.]]></description><link>https://blog.jacobstechtavern.com</link><image><url>https://substackcdn.com/image/fetch/$s_!LJp-!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee402e25-4e20-4683-ba5f-20ca86eb2b43_512x512.png</url><title>Jacob’s Tech Tavern</title><link>https://blog.jacobstechtavern.com</link></image><generator>Substack</generator><lastBuildDate>Fri, 29 May 2026 23:09:45 GMT</lastBuildDate><atom:link href="https://blog.jacobstechtavern.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Jacob Bartlett]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[jacobbartlett@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[jacobbartlett@substack.com]]></itunes:email><itunes:name><![CDATA[Jacob Bartlett]]></itunes:name></itunes:owner><itunes:author><![CDATA[Jacob Bartlett]]></itunes:author><googleplay:owner><![CDATA[jacobbartlett@substack.com]]></googleplay:owner><googleplay:email><![CDATA[jacobbartlett@substack.com]]></googleplay:email><googleplay:author><![CDATA[Jacob Bartlett]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Reliable Data Uploading on iOS]]></title><description><![CDATA[4 levels of confidence: simplicity, resilience, continuity, and durability]]></description><link>https://blog.jacobstechtavern.com/p/reliable-data-uploading-on-ios</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/reliable-data-uploading-on-ios</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Wed, 20 May 2026 15:01:48 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!fJ6K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2afdb131-6ddb-4b23-9ab3-35331b94193d_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fJ6K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2afdb131-6ddb-4b23-9ab3-35331b94193d_1680x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fJ6K!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2afdb131-6ddb-4b23-9ab3-35331b94193d_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!fJ6K!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2afdb131-6ddb-4b23-9ab3-35331b94193d_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!fJ6K!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2afdb131-6ddb-4b23-9ab3-35331b94193d_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!fJ6K!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2afdb131-6ddb-4b23-9ab3-35331b94193d_1680x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fJ6K!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2afdb131-6ddb-4b23-9ab3-35331b94193d_1680x1200.png" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2afdb131-6ddb-4b23-9ab3-35331b94193d_1680x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:2739594,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/189196940?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2afdb131-6ddb-4b23-9ab3-35331b94193d_1680x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fJ6K!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2afdb131-6ddb-4b23-9ab3-35331b94193d_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!fJ6K!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2afdb131-6ddb-4b23-9ab3-35331b94193d_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!fJ6K!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2afdb131-6ddb-4b23-9ab3-35331b94193d_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!fJ6K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2afdb131-6ddb-4b23-9ab3-35331b94193d_1680x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Reliably uploading data is sort of like brushing your teeth: it&#8217;s a dull chore, but you kind of have to do it, or you&#8217;re going to get an infected dental nerve. <em>What was I talking about again?</em> Right. Dental uploads. Data uploads.</p><p>Losing user data through developer negligence around upload hygiene is maybe #2 of the 3 most common <em>Very Bad Things</em> <em>You Can Do&#8482;</em> as a client-side developer. The worst is mucking up auth and logging out all your users. That&#8217;ll kill you. Crashes are a common #3. But losing data erodes user trust. Uploading properly is really important to understand.</p><p>I hacked together a simple <a href="https://github.com/jacobsapps/FakeTwitter">open-source companion project</a> that demonstrates all the techniques here. FakeTwitter. 4 tabs, identical UI, but each employing increasingly elaborate upload reliability as we climb the ladder from simplicity, to resilience, to continuity, to durability. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pKdK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c33cd4d-6a8a-49a0-a60f-4838d89c1fdf_2198x1198.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pKdK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c33cd4d-6a8a-49a0-a60f-4838d89c1fdf_2198x1198.png 424w, https://substackcdn.com/image/fetch/$s_!pKdK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c33cd4d-6a8a-49a0-a60f-4838d89c1fdf_2198x1198.png 848w, https://substackcdn.com/image/fetch/$s_!pKdK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c33cd4d-6a8a-49a0-a60f-4838d89c1fdf_2198x1198.png 1272w, https://substackcdn.com/image/fetch/$s_!pKdK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c33cd4d-6a8a-49a0-a60f-4838d89c1fdf_2198x1198.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pKdK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c33cd4d-6a8a-49a0-a60f-4838d89c1fdf_2198x1198.png" width="1456" height="794" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3c33cd4d-6a8a-49a0-a60f-4838d89c1fdf_2198x1198.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:794,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:747590,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/189196940?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c33cd4d-6a8a-49a0-a60f-4838d89c1fdf_2198x1198.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pKdK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c33cd4d-6a8a-49a0-a60f-4838d89c1fdf_2198x1198.png 424w, https://substackcdn.com/image/fetch/$s_!pKdK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c33cd4d-6a8a-49a0-a60f-4838d89c1fdf_2198x1198.png 848w, https://substackcdn.com/image/fetch/$s_!pKdK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c33cd4d-6a8a-49a0-a60f-4838d89c1fdf_2198x1198.png 1272w, https://substackcdn.com/image/fetch/$s_!pKdK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c33cd4d-6a8a-49a0-a60f-4838d89c1fdf_2198x1198.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The techniques can be mixed and matched based on your requirements. Usually you&#8217;ll have a mix, depending on what data needs to be reliable vs. what&#8217;s simple to ship and maintain, because each level introduces growing complexity.</p><p>I&#8217;m sharing practical advice you&#8217;ll be able to apply in your day-to-day when working with APIs. I also used the theory directly in my <a href="https://blog.jacobstechtavern.com/p/interview-grind">interview grind</a>, specifically in <a href="https://blog.jacobstechtavern.com/p/system-design-interview">system design</a> loops. </p><p>The important takeaway I want to give you is to be thoughtful about your networking: consider what level of reliability you actually need for your feature.</p><p>Once I&#8217;m done with you, users will be clawing at your office door, <em>begging</em> you to upload their data.</p><div><hr></div><h5><strong>Sponsored Link</strong></h5><h4><a href="https://www.revenuecat.com/release/meet-rico-your-embedded-app-growth-advisor-2026-05-05?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=rico-2026">Meet Rico by RevenueCat</a></h4><blockquote><p><a href="https://www.revenuecat.com/release/meet-rico-your-embedded-app-growth-advisor-2026-05-05?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=rico-2026">Rico</a> is your AI-powered app growth advisor. Ask questions about churn, pricing, experiments, or revenue trends and get actionable answers using your subscription data, benchmarks, and store configuration insights.</p></blockquote><div><hr></div><h2><strong>Contents</strong></h2><ul><li><p><a href="https://blog.jacobstechtavern.com/i/189196940/level-1-fire-and-forget">Level 1: Fire-and-Forget</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/189196940/level-2-retry-discipline">Level 2: Retry Discipline</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/189196940/user-surfaced-retry">User-Surfaced Retry</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/189196940/automated-retry">Automated Retry</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/189196940/idempotency-keys">Idempotency Keys</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/189196940/level-3-upload-continuity">Level 3: Upload Continuity</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/189196940/resumable-uploads">Resumable Uploads</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/189196940/background-modes">Background Modes</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/189196940/level-4-durable-uploads">Level 4: Durable Uploads</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/189196940/last-orders">Last Orders</a></p></li></ul><div><hr></div><h2><strong>Level 1: Fire-and-Forget</strong></h2><p>This is the simplest approach. By far. It&#8217;s also the default you&#8217;ll begin with for any upload request. </p><p>Just try POSTing your data using the bog-standard URLSession API. </p><p>You&#8217;ll ship fast, you&#8217;ll learn a lot, you&#8217;ll mostly get the data where it needs to go, but not always, and that&#8217;s fine.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GNoM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5699ea0-a303-4ab3-abf5-8217fad6757e_1738x630.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GNoM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5699ea0-a303-4ab3-abf5-8217fad6757e_1738x630.png 424w, https://substackcdn.com/image/fetch/$s_!GNoM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5699ea0-a303-4ab3-abf5-8217fad6757e_1738x630.png 848w, https://substackcdn.com/image/fetch/$s_!GNoM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5699ea0-a303-4ab3-abf5-8217fad6757e_1738x630.png 1272w, https://substackcdn.com/image/fetch/$s_!GNoM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5699ea0-a303-4ab3-abf5-8217fad6757e_1738x630.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GNoM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5699ea0-a303-4ab3-abf5-8217fad6757e_1738x630.png" width="1456" height="528" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d5699ea0-a303-4ab3-abf5-8217fad6757e_1738x630.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:528,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:212896,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/189196940?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5699ea0-a303-4ab3-abf5-8217fad6757e_1738x630.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GNoM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5699ea0-a303-4ab3-abf5-8217fad6757e_1738x630.png 424w, https://substackcdn.com/image/fetch/$s_!GNoM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5699ea0-a303-4ab3-abf5-8217fad6757e_1738x630.png 848w, https://substackcdn.com/image/fetch/$s_!GNoM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5699ea0-a303-4ab3-abf5-8217fad6757e_1738x630.png 1272w, https://substackcdn.com/image/fetch/$s_!GNoM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5699ea0-a303-4ab3-abf5-8217fad6757e_1738x630.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://gist.github.com/jacobsapps/d01248610be819427e35f30cc8d94f53">Gist</a></figcaption></figure></div><p>Level 1 isn&#8217;t just being dumb.</p><p>Most network requests in most apps, even those shipped by big tech, begin at Level 1. You default to this when loss of data is an acceptable outcome.</p><p>You should absolutely wrap this f&amp;*ker in a try/catch, log an error when the request fails, and surface <em>some kind of </em>feedback to the user. We&#8217;re Level 1 networkers, we aren&#8217;t animals.</p><p>Other than basic hygiene, there&#8217;s not too much to say.</p><p>Just remember that if the network drops, or the server has a temporary issue, your user&#8217;s data is just- <em>poof</em>. Gone. Kaput, like <a href="https://www.thedrinksbusiness.com/2026/02/brewdogs-equity-for-punks-investors-prepare-to-lose-out/">my Brewdog shares</a>.</p><div><hr></div><h2><strong>Level 2: Retry Discipline</strong></h2><p>This is where we start to limber up our <a href="https://blog.jacobstechtavern.com/p/system-design-interview">system design</a> chops.</p><p>You&#8217;ve likely encountered most of these, but it&#8217;s helpful to have the full toolkit laid out formally. We can introduce retry behaviour without seriously affecting our product surface, and without introducing any serious engineering challenges (yet).</p><h4><strong>User-Surfaced Retry</strong></h4><p>In Level 1, we considered surfacing errors to the user, like an alert. To advance to Level 2, just slap a retry button on this bad boy. This is actually employed by the &#8220;true&#8221; Twitter app <em>(perhaps you could argue that X is fake Twitter)</em> when your tweet fails to post.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Bkg-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91cc36f7-f6dd-47e2-bde9-a8ff5aac3c72_1206x970.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Bkg-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91cc36f7-f6dd-47e2-bde9-a8ff5aac3c72_1206x970.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Bkg-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91cc36f7-f6dd-47e2-bde9-a8ff5aac3c72_1206x970.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Bkg-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91cc36f7-f6dd-47e2-bde9-a8ff5aac3c72_1206x970.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Bkg-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91cc36f7-f6dd-47e2-bde9-a8ff5aac3c72_1206x970.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Bkg-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91cc36f7-f6dd-47e2-bde9-a8ff5aac3c72_1206x970.jpeg" width="1206" height="970" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/91cc36f7-f6dd-47e2-bde9-a8ff5aac3c72_1206x970.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:970,&quot;width&quot;:1206,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:97396,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/189196940?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91cc36f7-f6dd-47e2-bde9-a8ff5aac3c72_1206x970.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Bkg-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91cc36f7-f6dd-47e2-bde9-a8ff5aac3c72_1206x970.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Bkg-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91cc36f7-f6dd-47e2-bde9-a8ff5aac3c72_1206x970.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Bkg-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91cc36f7-f6dd-47e2-bde9-a8ff5aac3c72_1206x970.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Bkg-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91cc36f7-f6dd-47e2-bde9-a8ff5aac3c72_1206x970.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4><strong>Automated Retry</strong></h4><p>We don&#8217;t immediately need to run crying to the user for help.</p><p>Automated retries offer a number of strategies. The most basic is a recursive retry with an incrementing counter to attempt a max number of times.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TGPn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face2e97e-198e-4541-a1d6-c4315e0bb4ee_1586x630.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TGPn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face2e97e-198e-4541-a1d6-c4315e0bb4ee_1586x630.png 424w, https://substackcdn.com/image/fetch/$s_!TGPn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face2e97e-198e-4541-a1d6-c4315e0bb4ee_1586x630.png 848w, https://substackcdn.com/image/fetch/$s_!TGPn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face2e97e-198e-4541-a1d6-c4315e0bb4ee_1586x630.png 1272w, https://substackcdn.com/image/fetch/$s_!TGPn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face2e97e-198e-4541-a1d6-c4315e0bb4ee_1586x630.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TGPn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face2e97e-198e-4541-a1d6-c4315e0bb4ee_1586x630.png" width="1456" height="578" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ace2e97e-198e-4541-a1d6-c4315e0bb4ee_1586x630.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:578,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:160184,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/189196940?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face2e97e-198e-4541-a1d6-c4315e0bb4ee_1586x630.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TGPn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face2e97e-198e-4541-a1d6-c4315e0bb4ee_1586x630.png 424w, https://substackcdn.com/image/fetch/$s_!TGPn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face2e97e-198e-4541-a1d6-c4315e0bb4ee_1586x630.png 848w, https://substackcdn.com/image/fetch/$s_!TGPn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face2e97e-198e-4541-a1d6-c4315e0bb4ee_1586x630.png 1272w, https://substackcdn.com/image/fetch/$s_!TGPn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face2e97e-198e-4541-a1d6-c4315e0bb4ee_1586x630.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://gist.github.com/jacobsapps/38eabf8d6064adab95f5448718215a4b">Gist</a></figcaption></figure></div><p>Exponential backoff is the most famous flavour of automatic retry, where you double the wait between each attempt, the exponent in this case being t = 2&#8319;, where t is the wait before retrying and n is the number of retries. For the less mathematically-inclined reader, this is doubling every time.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Y9Sx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c211d79-0e89-4b67-8c6c-85a06a19cf47_1796x1212.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Y9Sx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c211d79-0e89-4b67-8c6c-85a06a19cf47_1796x1212.png 424w, https://substackcdn.com/image/fetch/$s_!Y9Sx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c211d79-0e89-4b67-8c6c-85a06a19cf47_1796x1212.png 848w, https://substackcdn.com/image/fetch/$s_!Y9Sx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c211d79-0e89-4b67-8c6c-85a06a19cf47_1796x1212.png 1272w, https://substackcdn.com/image/fetch/$s_!Y9Sx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c211d79-0e89-4b67-8c6c-85a06a19cf47_1796x1212.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Y9Sx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c211d79-0e89-4b67-8c6c-85a06a19cf47_1796x1212.png" width="1456" height="983" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4c211d79-0e89-4b67-8c6c-85a06a19cf47_1796x1212.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:983,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:370842,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/189196940?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c211d79-0e89-4b67-8c6c-85a06a19cf47_1796x1212.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Y9Sx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c211d79-0e89-4b67-8c6c-85a06a19cf47_1796x1212.png 424w, https://substackcdn.com/image/fetch/$s_!Y9Sx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c211d79-0e89-4b67-8c6c-85a06a19cf47_1796x1212.png 848w, https://substackcdn.com/image/fetch/$s_!Y9Sx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c211d79-0e89-4b67-8c6c-85a06a19cf47_1796x1212.png 1272w, https://substackcdn.com/image/fetch/$s_!Y9Sx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c211d79-0e89-4b67-8c6c-85a06a19cf47_1796x1212.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://gist.github.com/jacobsapps/67fb51a5462e05a14b62ef2a91f356e4">Gist</a></figcaption></figure></div><p>If the request keeps failing, we try again after 1 second, 2 seconds, 4 seconds, then 8 seconds, and ultimately fail after 5 attempts.</p><p>Some errors are a <em>you</em> problem. Perhaps you listened to <a href="https://www.vice.com/en/article/qanon-queen-bills-electricty-canada/">the Queen of Canada</a> and stopped paying your cellphone bill. Some errors are a <em>me</em> problem. Oh no, <a href="https://blog.jacobstechtavern.com/p/the-great-connection-pool-meltdown">the server is on fire</a>, and can&#8217;t stop sending 500 responses. </p><p>We can introduce a circuit breaker in the latter case, blocking requests entirely. This avoids hammering our ailing server and gives it a short cooldown window to stop melting.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dlJ3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74f7231-78f6-4cf5-8173-8c03f4c0269a_1450x1078.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dlJ3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74f7231-78f6-4cf5-8173-8c03f4c0269a_1450x1078.png 424w, https://substackcdn.com/image/fetch/$s_!dlJ3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74f7231-78f6-4cf5-8173-8c03f4c0269a_1450x1078.png 848w, https://substackcdn.com/image/fetch/$s_!dlJ3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74f7231-78f6-4cf5-8173-8c03f4c0269a_1450x1078.png 1272w, https://substackcdn.com/image/fetch/$s_!dlJ3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74f7231-78f6-4cf5-8173-8c03f4c0269a_1450x1078.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dlJ3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74f7231-78f6-4cf5-8173-8c03f4c0269a_1450x1078.png" width="1450" height="1078" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f74f7231-78f6-4cf5-8173-8c03f4c0269a_1450x1078.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1078,&quot;width&quot;:1450,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:229193,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/189196940?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74f7231-78f6-4cf5-8173-8c03f4c0269a_1450x1078.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dlJ3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74f7231-78f6-4cf5-8173-8c03f4c0269a_1450x1078.png 424w, https://substackcdn.com/image/fetch/$s_!dlJ3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74f7231-78f6-4cf5-8173-8c03f4c0269a_1450x1078.png 848w, https://substackcdn.com/image/fetch/$s_!dlJ3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74f7231-78f6-4cf5-8173-8c03f4c0269a_1450x1078.png 1272w, https://substackcdn.com/image/fetch/$s_!dlJ3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74f7231-78f6-4cf5-8173-8c03f4c0269a_1450x1078.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://gist.github.com/jacobsapps/f98d86173703ecb377eaa13d6a261904">Gist</a></figcaption></figure></div><p>When your server flails, it can return errors for everyone at once. This can lead to all your users retrying simultaneously, crashing into your server once it&#8217;s back up and killing you again. This is called the <strong>thundering herd</strong> problem. We can guard against this by adding <strong>jitter</strong> to retries. This is a bit of randomised jiggle added between each backoff to space out retries. </p><p><a href="https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/">This AWS blog post</a> goes deep into jitter strategies (so I don&#8217;t have to).</p><p>If your backend guys are <em>really</em> trying to earn their staff promo, they might supply a <strong>Retry-After</strong> HTTP response header telling the client exactly when they can retry:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jC1V!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788b129f-3bbc-44fd-902d-f441301c40aa_1296x584.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jC1V!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788b129f-3bbc-44fd-902d-f441301c40aa_1296x584.png 424w, https://substackcdn.com/image/fetch/$s_!jC1V!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788b129f-3bbc-44fd-902d-f441301c40aa_1296x584.png 848w, https://substackcdn.com/image/fetch/$s_!jC1V!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788b129f-3bbc-44fd-902d-f441301c40aa_1296x584.png 1272w, https://substackcdn.com/image/fetch/$s_!jC1V!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788b129f-3bbc-44fd-902d-f441301c40aa_1296x584.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jC1V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788b129f-3bbc-44fd-902d-f441301c40aa_1296x584.png" width="1296" height="584" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/788b129f-3bbc-44fd-902d-f441301c40aa_1296x584.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:584,&quot;width&quot;:1296,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:122445,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/189196940?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788b129f-3bbc-44fd-902d-f441301c40aa_1296x584.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jC1V!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788b129f-3bbc-44fd-902d-f441301c40aa_1296x584.png 424w, https://substackcdn.com/image/fetch/$s_!jC1V!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788b129f-3bbc-44fd-902d-f441301c40aa_1296x584.png 848w, https://substackcdn.com/image/fetch/$s_!jC1V!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788b129f-3bbc-44fd-902d-f441301c40aa_1296x584.png 1272w, https://substackcdn.com/image/fetch/$s_!jC1V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F788b129f-3bbc-44fd-902d-f441301c40aa_1296x584.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://gist.github.com/jacobsapps/25143933dc93be3183ca267337a2dfd8">Gist</a></figcaption></figure></div><h4><strong>Idempotency Keys</strong></h4><p>&#8220;Idempotency key&#8221; <em>sounds</em> very complicated, primarily because idempotency is a long and scary word. I actually left my ex wife because she said I was idempotent.</p><p>Consider making a bank transaction. It succeeds on the server, but I miss the 201 success response because the connection drops at the worst possible time. Network error? Automatic retry. I do <em>not</em> want to be sending double alimony, but fortunately idempotency comes to our rescue.</p><div class="callout-block" data-callout="true"><p>Look, I was pretty proud of that joke; if you laughed, please pay me money.</p><p>Most apps will implement retries and call it a day. Upgrade today for the full production-grade reliability toolkit, which handles flaky networks, backgrounding, interruptions, and when to implement a durable sync engine.</p><div><hr></div><p><em>Paid members also unlock several nice things:</em></p><p><em>&#127775; Access <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, my exclusive advanced content <br>&#128640; Read <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> a month before anyone else <br>&#129525; Master concurrency with my <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course">full course</a> and <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced training</a><br>&#129489;&#8205;&#128640; Get a free copy of my new eBook, &#8220;<a href="https://payhip.com/b/tvoug">Land your iOS Tech Job</a>&#8221;<br>&#10084;&#65039;&#8205;&#129657; Support independent, sometimes funny, tech writing<br>&#129297; Lock in the lower price now before prices go up at the end of the month!</em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe&quot;,&quot;text&quot;:&quot;Unlock Levels 2-4 now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe"><span>Unlock Levels 2-4 now</span></a></p>
      <p>
          <a href="https://blog.jacobstechtavern.com/p/reliable-data-uploading-on-ios">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Touch to Pixels: UI Pipeline Internals on iOS]]></title><description><![CDATA[A journey through hardware, backboardd, Core Animation, and the render server]]></description><link>https://blog.jacobstechtavern.com/p/ui-pipeline-internals</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/ui-pipeline-internals</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Wed, 13 May 2026 15:03:01 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!m4bq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc761a8dc-045b-4a52-9225-ce99bec41fca_5917x2099.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I&#8217;ll save you 20 mins if you don&#8217;t want to read a whole blog post:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!m4bq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc761a8dc-045b-4a52-9225-ce99bec41fca_5917x2099.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!m4bq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc761a8dc-045b-4a52-9225-ce99bec41fca_5917x2099.png 424w, https://substackcdn.com/image/fetch/$s_!m4bq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc761a8dc-045b-4a52-9225-ce99bec41fca_5917x2099.png 848w, https://substackcdn.com/image/fetch/$s_!m4bq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc761a8dc-045b-4a52-9225-ce99bec41fca_5917x2099.png 1272w, https://substackcdn.com/image/fetch/$s_!m4bq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc761a8dc-045b-4a52-9225-ce99bec41fca_5917x2099.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!m4bq!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc761a8dc-045b-4a52-9225-ce99bec41fca_5917x2099.png" width="1200" height="426.0989010989011" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c761a8dc-045b-4a52-9225-ce99bec41fca_5917x2099.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:517,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:1225466,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185299825?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc761a8dc-045b-4a52-9225-ce99bec41fca_5917x2099.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!m4bq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc761a8dc-045b-4a52-9225-ce99bec41fca_5917x2099.png 424w, https://substackcdn.com/image/fetch/$s_!m4bq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc761a8dc-045b-4a52-9225-ce99bec41fca_5917x2099.png 848w, https://substackcdn.com/image/fetch/$s_!m4bq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc761a8dc-045b-4a52-9225-ce99bec41fca_5917x2099.png 1272w, https://substackcdn.com/image/fetch/$s_!m4bq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc761a8dc-045b-4a52-9225-ce99bec41fca_5917x2099.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Copy it on a sticky note and leave it under your monitor for your next<em> </em>interview.</p><h5><strong>Sponsored Link</strong></h5><h4><a href="https://www.revenuecat.com/release/meet-rico-your-embedded-app-growth-advisor-2026-05-05?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=rico-2026">Meet Rico by RevenueCat</a></h4><blockquote><p><a href="https://www.revenuecat.com/release/meet-rico-your-embedded-app-growth-advisor-2026-05-05?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=rico-2026">Rico</a> is your AI-powered app growth advisor. Ask questions about churn, pricing, experiments, or revenue trends and get actionable answers using your subscription data, benchmarks, and store configuration insights.</p></blockquote><div><hr></div><p>I usually love the <em>iOS Knowledge Interview&#8482; </em>format: 45 mins to flex my encyclopaedic knowledge of <a href="https://blog.jacobstechtavern.com/p/copy-on-write-swift-internals">the Swift compiler</a>, <a href="https://blog.jacobstechtavern.com/p/swift-method-dispatch">method dispatch</a>, <a href="https://blog.jacobstechtavern.com/p/swift-reference-counting">memory management</a> or <a href="https://blog.jacobstechtavern.com/p/reverse-engineer-private-frameworks">Mach-O binaries</a>.</p><p>Until recently. I was asked to <em>&#8220;explain the rendering pipeline on iOS&#8221;.</em></p><div class="callout-block" data-callout="true"><p><em>&#8220;Uh&#8230; so there&#8217;s a screen. It has pixels. It detects touches. I reckon Core Animation probably does something up in there&#8230;</em>&#8221;<br><strong>&#8212; Jacob Bartlett, 2025</strong> <em>(I didn&#8217;t get the job)</em></p></div><p>It&#8217;s easy to let this slip. The system abstracts away the heavy lifting.</p><p>But this heavy lifting controls <em>every single pixel</em> on <em>every single frame</em> of <em>every app</em> you build. It&#8217;s worth taking the time to understand it properly.</p><p>The UI pipeline is a complex beast, orchestrating across several lightly-documented systems. It&#8217;s tough to find a throughline that can explain it all. Fortunately, you&#8217;re in good hands.</p><p><strong>We&#8217;re tracking the journey of a touch event: from sensors, to your code, and back up to pixels, through every system along the way:</strong></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/185299825/handling-physical-touch">Your finger taps the capacitive touch sensor.</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/publish/post/185299825?back=%2Fpublish%2Fposts%2Fscheduled">The kernel creates a touch event via hardware drivers.</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185299825/backboardd">backboardd handles the event and forwards it to your app process.</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185299825/the-run-loop">Your app&#8217;s run loop passes a UIEvent to the relevant view.</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185299825/coreanimation-transactions-and-commits">Your code performs a CATransaction to update its layer tree.</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185299825/the-layer-tree-and-cacontext">The UIWindow&#8217;s CAContext bridges to the render server via IPC.</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185299825/the-render-server-and-lots-of-definitions">The render server rasterises and composites layers across each process.</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185299825/the-gpu">It then issues drawing commands to the GPU for compositing and animation.</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185299825/display-controller-frame-buffer-and-vsync">A frame buffer of pixels is generated and sent to the display hardware.</a></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>Handling Physical Touch</h2><h4>The Hardware</h4><p>In the late 90s, <a href="https://www.bbc.co.uk/news/business-38320198">Uncle Sam funded some research</a> that led to breakthroughs in multi-touch capacitive touch screens. In 2007, Daddy Steve stuck this in front of a jumble of miniaturised tech that was finally ready for prime-time: modern microprocessors, a cellular radio, and high-capacity lithium batteries. The rest is history.</p><p>Under the glass of your iPhone screen, there is a grid of transparent criss-crossing X and Y wires. A microcontroller applies an electric field across each X wire, and measures signals across each Y wire.</p><p>Because human flesh is electrically conductive <em>(don&#8217;t ask me how I found this out)</em>, the presence of a finger changes the electrical capacitance measured at XY intersections. The microcontroller scans across each wire to create a real-time 2D touch map.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VrPZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98aca2e-3273-4526-beb6-7bb1d144d63a_752x521.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VrPZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98aca2e-3273-4526-beb6-7bb1d144d63a_752x521.jpeg 424w, https://substackcdn.com/image/fetch/$s_!VrPZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98aca2e-3273-4526-beb6-7bb1d144d63a_752x521.jpeg 848w, https://substackcdn.com/image/fetch/$s_!VrPZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98aca2e-3273-4526-beb6-7bb1d144d63a_752x521.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!VrPZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98aca2e-3273-4526-beb6-7bb1d144d63a_752x521.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VrPZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98aca2e-3273-4526-beb6-7bb1d144d63a_752x521.jpeg" width="752" height="521" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e98aca2e-3273-4526-beb6-7bb1d144d63a_752x521.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:521,&quot;width&quot;:752,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:90927,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185299825?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98aca2e-3273-4526-beb6-7bb1d144d63a_752x521.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VrPZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98aca2e-3273-4526-beb6-7bb1d144d63a_752x521.jpeg 424w, https://substackcdn.com/image/fetch/$s_!VrPZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98aca2e-3273-4526-beb6-7bb1d144d63a_752x521.jpeg 848w, https://substackcdn.com/image/fetch/$s_!VrPZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98aca2e-3273-4526-beb6-7bb1d144d63a_752x521.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!VrPZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98aca2e-3273-4526-beb6-7bb1d144d63a_752x521.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">How a capacitive touch screen works, from <a href="https://electronics.stackexchange.com/questions/142186/how-does-a-capacitive-multi-touch-screen-capture-multiple-triggers">Electronics StackExchange</a></figcaption></figure></div><div><hr></div><h4>The Kernel</h4><p>The kernel is the core of an operating system. It creates and manages abstractions on top of hardware:</p><ul><li><p>CPU becomes threads.</p></li><li><p>RAM becomes heap memory.</p></li><li><p>Flash storage becomes a file system. </p></li></ul><p>The kernel&#8217;s other main responsibility is I/O: that is, talking to the hardware. This interfacing is done via <em>drivers</em>, specialised software that translates input commands and output signals.</p><p>The <a href="https://github.com/apple-oss-distributions/xnu">xnu kernel</a> on iOS interfaces with the capacitive touch hardware via <a href="https://developer.apple.com/documentation/iokit">IOKit</a>. </p><p>The hardware sends signals that the OS decodes into an <strong><a href="https://github.com/gderaco/iOS-Battery-Info-Demo/blob/master/Battery%20Info/IOKit/hid/IOHIDEventTypes.h">IOHIDEvent</a></strong> (IOKit human-interface device event) to represent touch events such as rotations, scrolls, or swipes. This event is sent to backboardd.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eHQN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d9b4a5-a0b6-489a-a111-a3a040d0c091_2292x1314.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eHQN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d9b4a5-a0b6-489a-a111-a3a040d0c091_2292x1314.png 424w, https://substackcdn.com/image/fetch/$s_!eHQN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d9b4a5-a0b6-489a-a111-a3a040d0c091_2292x1314.png 848w, https://substackcdn.com/image/fetch/$s_!eHQN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d9b4a5-a0b6-489a-a111-a3a040d0c091_2292x1314.png 1272w, https://substackcdn.com/image/fetch/$s_!eHQN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d9b4a5-a0b6-489a-a111-a3a040d0c091_2292x1314.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eHQN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d9b4a5-a0b6-489a-a111-a3a040d0c091_2292x1314.png" width="1456" height="835" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/83d9b4a5-a0b6-489a-a111-a3a040d0c091_2292x1314.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:835,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:427973,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185299825?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d9b4a5-a0b6-489a-a111-a3a040d0c091_2292x1314.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eHQN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d9b4a5-a0b6-489a-a111-a3a040d0c091_2292x1314.png 424w, https://substackcdn.com/image/fetch/$s_!eHQN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d9b4a5-a0b6-489a-a111-a3a040d0c091_2292x1314.png 848w, https://substackcdn.com/image/fetch/$s_!eHQN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d9b4a5-a0b6-489a-a111-a3a040d0c091_2292x1314.png 1272w, https://substackcdn.com/image/fetch/$s_!eHQN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d9b4a5-a0b6-489a-a111-a3a040d0c091_2292x1314.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">IOHIDEventType.h, from a <a href="https://github.com/gderaco/iOS-Battery-Info-Demo/blob/master/Battery%20Info/IOKit/hid/IOHIDEventTypes.h">dump of private IOKit APIs</a></figcaption></figure></div><h4>backboardd</h4><p>backboardd is a daemon, which you can tell from the dangling D in its name. </p><p>Daemons are background processes run by the OS. Just like their biblical namesake, they never sleep, and they&#8217;re always watching you.</p><p>In the case of <a href="https://theapplewiki.com/wiki/Dev:Backboardd">backboardd</a>, it manages system tasks like screen dimming, reads input from hardware sensors like the accelerometer, and handles physical touch events.</p><blockquote><p><em>This section is slightly hand-wavey because it&#8217;s not documented. Apple doesn&#8217;t feel the need to, because all this complexity is abstracted away from developers. </em></p><p><em>My only data sources are <a href="https://theapplewiki.com/wiki/Backboardd">old Wikis</a>, <a href="https://github.com/EthanArbuckle/ios-rendering-docs">unofficial write-ups</a> and <a href="https://developer.limneos.net/index.php?ios=14.4&amp;framework=BackBoardServices.framework&amp;header=BackBoardServices-Structs.h">reverse engineering dumps</a>. Please bear with me a moment &#8216;til we land in the run loop.</em></p></blockquote><p>BackBoardServices is a subsystem inside this daemon that performs bridging between device I/O and userland processes, including your app. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4X-9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76c0ef5e-e01e-4734-a23e-22886f1ce834_4713x1468.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4X-9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76c0ef5e-e01e-4734-a23e-22886f1ce834_4713x1468.png 424w, https://substackcdn.com/image/fetch/$s_!4X-9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76c0ef5e-e01e-4734-a23e-22886f1ce834_4713x1468.png 848w, https://substackcdn.com/image/fetch/$s_!4X-9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76c0ef5e-e01e-4734-a23e-22886f1ce834_4713x1468.png 1272w, https://substackcdn.com/image/fetch/$s_!4X-9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76c0ef5e-e01e-4734-a23e-22886f1ce834_4713x1468.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4X-9!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76c0ef5e-e01e-4734-a23e-22886f1ce834_4713x1468.png" width="1200" height="374.1758241758242" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/76c0ef5e-e01e-4734-a23e-22886f1ce834_4713x1468.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:454,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:552190,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185299825?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76c0ef5e-e01e-4734-a23e-22886f1ce834_4713x1468.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4X-9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76c0ef5e-e01e-4734-a23e-22886f1ce834_4713x1468.png 424w, https://substackcdn.com/image/fetch/$s_!4X-9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76c0ef5e-e01e-4734-a23e-22886f1ce834_4713x1468.png 848w, https://substackcdn.com/image/fetch/$s_!4X-9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76c0ef5e-e01e-4734-a23e-22886f1ce834_4713x1468.png 1272w, https://substackcdn.com/image/fetch/$s_!4X-9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76c0ef5e-e01e-4734-a23e-22886f1ce834_4713x1468.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>It generates a GraphicsServices event (<strong><a href="https://theapplewiki.com/wiki/Dev:GraphicsServices.framework">GSEvent</a></strong>) for the touch and sends it to the relevant app process using inter-process communication (IPC), a secure communication channel provided by the OS.</p><p>To determine the <em>relevant app process</em>, backboardd talks to <a href="https://theapplewiki.com/wiki/Backboardd">FrontBoard</a> (a part of <a href="https://blog.jacobstechtavern.com/p/2-minute-tips-ios-springboard-paddling">SpringBoard</a>). FrontBoard is what powers the app switcher, managing the on-screen visible &#8220;scenes&#8221; for stuff like the home screen and each individual app. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SmsT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7ce0d09-82b3-4d05-8db7-3a5f0bfb628d_1206x878.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SmsT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7ce0d09-82b3-4d05-8db7-3a5f0bfb628d_1206x878.jpeg 424w, https://substackcdn.com/image/fetch/$s_!SmsT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7ce0d09-82b3-4d05-8db7-3a5f0bfb628d_1206x878.jpeg 848w, https://substackcdn.com/image/fetch/$s_!SmsT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7ce0d09-82b3-4d05-8db7-3a5f0bfb628d_1206x878.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!SmsT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7ce0d09-82b3-4d05-8db7-3a5f0bfb628d_1206x878.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SmsT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7ce0d09-82b3-4d05-8db7-3a5f0bfb628d_1206x878.jpeg" width="1206" height="878" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a7ce0d09-82b3-4d05-8db7-3a5f0bfb628d_1206x878.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:878,&quot;width&quot;:1206,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:136809,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185299825?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7ce0d09-82b3-4d05-8db7-3a5f0bfb628d_1206x878.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SmsT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7ce0d09-82b3-4d05-8db7-3a5f0bfb628d_1206x878.jpeg 424w, https://substackcdn.com/image/fetch/$s_!SmsT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7ce0d09-82b3-4d05-8db7-3a5f0bfb628d_1206x878.jpeg 848w, https://substackcdn.com/image/fetch/$s_!SmsT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7ce0d09-82b3-4d05-8db7-3a5f0bfb628d_1206x878.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!SmsT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7ce0d09-82b3-4d05-8db7-3a5f0bfb628d_1206x878.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">FrontBoard in action</figcaption></figure></div><p>This scene, or <strong><a href="https://github.com/xybp888/iOS-Header/blob/master/13.0/PrivateFrameworks/FrontBoard.framework/FBScene.h">FBScene</a>,</strong> is associated with your app&#8217;s <strong><a href="https://github.com/nst/iOS-Runtime-Headers/blob/master/Frameworks/QuartzCore.framework/CAContext.h">CAContext</a></strong>, or Core Animation context, underpinning all of your UI. BackBoardServices can read out the CAContext&#8217;s <strong>contextID</strong> to determine the correct app process for the touch event, and forward it on.</p><div class="callout-block" data-callout="true"><p>The journey of a thousand miles begins with a single step. The journey of understanding the full end-to-end UI internals pipeline continues by paying me money. </p><p>Keep reading to follow your tap as it enters your app&#8217;s run loop, then through CATransactions, IPC, the layer tree, the render server, the GPU, vsync, and pixels.</p></div><blockquote><p><em>Upgrade to unlock this article, plus much more:</em></p><p><em>&#127775; Access <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, my exclusive advanced content <br>&#128640; Read <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> a month before anyone else <br>&#129525; Master concurrency with my <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course">full course</a> and <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced training</a><br>&#129489;&#8205;&#128640; Get a free copy of my new eBook, &#8220;<a href="https://payhip.com/b/tvoug">Land your iOS Tech Job</a>&#8221;<br>&#10084;&#65039;&#8205;&#129657; Support independent, sometimes funny, tech writing</em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p>
      <p>
          <a href="https://blog.jacobstechtavern.com/p/ui-pipeline-internals">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Jacob's Tech Tavern v3.0 ]]></title><description><![CDATA[A deal three years in the making]]></description><link>https://blog.jacobstechtavern.com/p/jacobs-tech-tavern-v30</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/jacobs-tech-tavern-v30</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Tue, 12 May 2026 14:38:12 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!c4pI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd2bd564-fc58-4526-ac0f-d0e44020d585_5917x2099.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="callout-block" data-callout="true"><p><em>tl;dr for the busy iOS engineer: </em></p><p><em>&#128184; Prices go up to $15/month at the end of May. <br>&#128274; All paid members before then <strong>keep their lower price</strong>. <br>&#129512; Tomorrow&#8217;s article is a banger.</em> </p></div><p>I turned 31 today.</p><p>You can&#8217;t just raise blog pricing every few months like a maniac. You only really get a couple of shots in the chamber. <a href="https://blog.jacobstechtavern.com/p/impostor-syndrome-and-business-acumen">I first did it last May</a>, but Jacob&#8217;s Tech Tavern is a <em>much</em> better deal than it was in 2025.</p><p>My premium content used to be <em>&#8220;Quick Hacks&#8221;</em>, just a little something extra for people who wanted to support me. But today <a href="https://blog.jacobstechtavern.com/t/elite-hacks">my best work</a> is behind the paywall:</p><p>&#128218; Premium members get a full library of 45 paywalled articles <em>(up from 18 last May) </em><br>&#128073; This is <strong>98,000 words</strong> of advanced iOS writing <em>(up from 23,000)</em></p><p>Perhaps <em>number of words</em> is a useless vanity metric, like <em>number of commits</em> or <em>lines of code</em>. If you want to talk intangibles, you also get that warm, fuzzy feeling that comes from supporting independent (sometimes funny) writing, and also it&#8217;s my birthday.</p><p>As one final present (uno reverso), <em>all</em> paid subscribers now get a free copy of my new eBook, &#8220;<a href="https://payhip.com/b/tvoug">Land your iOS Tech Job</a>&#8221;. &#129395; </p><p><strong>Premium membership goes up to $15/month ($150/year) on May 31.</strong> <br>Anyone who subscribes before then will <strong>continue paying less, forever</strong>.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h3>Sneak Preview</h3><p>Tomorrow, premium members will receive my greatest deep-dive yet:</p><p><strong>Touch to Pixels: UI Pipeline Internals on iOS<br></strong><em>A journey through hardware, backboardd, Core Animation, and the render server</em></p><p>Here&#8217;s a little taster of what you can expect:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!c4pI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd2bd564-fc58-4526-ac0f-d0e44020d585_5917x2099.png" data-component-name="Image2ToDOM"><div class="image2-inset image2-full-screen"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!c4pI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd2bd564-fc58-4526-ac0f-d0e44020d585_5917x2099.png 424w, https://substackcdn.com/image/fetch/$s_!c4pI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd2bd564-fc58-4526-ac0f-d0e44020d585_5917x2099.png 848w, https://substackcdn.com/image/fetch/$s_!c4pI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd2bd564-fc58-4526-ac0f-d0e44020d585_5917x2099.png 1272w, https://substackcdn.com/image/fetch/$s_!c4pI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd2bd564-fc58-4526-ac0f-d0e44020d585_5917x2099.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!c4pI!,w_5760,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd2bd564-fc58-4526-ac0f-d0e44020d585_5917x2099.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dd2bd564-fc58-4526-ac0f-d0e44020d585_5917x2099.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;full&quot;,&quot;height&quot;:517,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1225466,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185299825?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd2bd564-fc58-4526-ac0f-d0e44020d585_5917x2099.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-fullscreen" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!c4pI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd2bd564-fc58-4526-ac0f-d0e44020d585_5917x2099.png 424w, https://substackcdn.com/image/fetch/$s_!c4pI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd2bd564-fc58-4526-ac0f-d0e44020d585_5917x2099.png 848w, https://substackcdn.com/image/fetch/$s_!c4pI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd2bd564-fc58-4526-ac0f-d0e44020d585_5917x2099.png 1272w, https://substackcdn.com/image/fetch/$s_!c4pI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd2bd564-fc58-4526-ac0f-d0e44020d585_5917x2099.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Upgrade now to lock in my lower price, plus much more:</p><blockquote><p><em>&#127775; Access <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, my exclusive advanced content <br>&#128640; Read <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> a month before anyone else <br>&#129525; Master concurrency with my <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course">full course</a> and <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced training</a><br>&#129489;&#8205;&#128640; Get a free copy of my new eBook, &#8220;<a href="https://payhip.com/b/tvoug">Land your iOS Tech Job</a>&#8221;<br>&#10084;&#65039;&#8205;&#129657; Support independent, sometimes funny, tech writing</em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[The 3 Levels of Swift Concurrency]]></title><description><![CDATA[The tiers of Swift 6.2 approachable concurrency]]></description><link>https://blog.jacobstechtavern.com/p/3-levels-of-concurrency</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/3-levels-of-concurrency</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Wed, 06 May 2026 08:31:20 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!IN9x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5e01f0-62ae-4e2b-bf61-679186c359b8_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IN9x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5e01f0-62ae-4e2b-bf61-679186c359b8_1680x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IN9x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5e01f0-62ae-4e2b-bf61-679186c359b8_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!IN9x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5e01f0-62ae-4e2b-bf61-679186c359b8_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!IN9x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5e01f0-62ae-4e2b-bf61-679186c359b8_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!IN9x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5e01f0-62ae-4e2b-bf61-679186c359b8_1680x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IN9x!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5e01f0-62ae-4e2b-bf61-679186c359b8_1680x1200.png" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b5e01f0-62ae-4e2b-bf61-679186c359b8_1680x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:4433458,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/192711223?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5e01f0-62ae-4e2b-bf61-679186c359b8_1680x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IN9x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5e01f0-62ae-4e2b-bf61-679186c359b8_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!IN9x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5e01f0-62ae-4e2b-bf61-679186c359b8_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!IN9x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5e01f0-62ae-4e2b-bf61-679186c359b8_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!IN9x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5e01f0-62ae-4e2b-bf61-679186c359b8_1680x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Swift Concurrency is really bl**dy complicated, which is great for me, financially. </p><p>Swift&#8217;s whole deal is making it <strong>really hard to write broken code</strong>: type-safe nullability, automatic memory management, and <em>compiler guarantees around data races</em>. </p><p>This is the whole reason your codebase suddenly grew 14,000,001 compiler warnings around non-Sendable classes. The Swift team were not being jerks, they wanted you to think about data isolation.</p><p>In a rare spurt of Apple humility, the team acknowledged this unintentional complexity in the <a href="https://github.com/swiftlang/swift-evolution/blob/main/visions/approachable-concurrency.md">Approachable Concurrency manifesto</a>:</p><div class="callout-block" data-callout="true"><p>Swift&#8217;s built-in support for concurrency has three goals:</p><ol><li><p>Extend memory safety guarantees to low-level data races.</p></li><li><p>Progressive disclosure, making basic use of concurrency easy.</p></li><li><p>Make advanced uses of concurrency to improve performance natural.</p></li></ol><p>Swift meets the first goal, but it comes at the cost of the second, and can be frustrating to adopt.</p></div><p>Progressive disclosure is a core Apple design philosophy: <em>make basic options easy to access, but reveal advanced use cases when needed</em>. Think Dock &#8594; Finder &#8594; bash shell for working in your file system. The same approach applies to language design. </p><p>Easy to get started. </p><p>Straightforward to level up when needed. </p><p>Thus the Swift 6.2 Approachable Concurrency story began. </p><p>Your concurrency journey now has 3 levels:</p><ol><li><p><a href="https://blog.jacobstechtavern.com/i/196597661/level-1-main-actor-4-life">Code on the main actor by default. It&#8217;s all single threaded.</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/192711223/level-2-async-and-serial">Basic use of </a><strong><a href="https://blog.jacobstechtavern.com/i/192711223/level-2-async-and-serial">async</a></strong><a href="https://blog.jacobstechtavern.com/i/196597661/level-2-async-and-serial"> functions, running on the main actor.</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/196597661/level-3-concurrent-f">Explicit concurrency off-main actor via </a><strong><a href="https://blog.jacobstechtavern.com/i/196597661/level-3-concurrent-f">@concurrent</a></strong><a href="https://blog.jacobstechtavern.com/i/196597661/level-3-concurrent-f">.</a></p></li></ol><p>If you come to Jacob&#8217;s Tech Tavern for the 3-line summaries, my work here is done. But these 3 bullet points conceal a lot of complexity. Admittedly, it was all pretty unclear to me until I wrote this.</p><p>Fundamentally, the new world revolves around 2 new settings in Xcode:</p><ul><li><p>Approachable Concurrency (<strong>Yes</strong>/No)</p></li><li><p>Default Actor Isolation (<strong>MainActor</strong>/nonisolated)</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XphY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf3ef87e-f504-458d-a68c-10bf20e53b9f_1900x548.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XphY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf3ef87e-f504-458d-a68c-10bf20e53b9f_1900x548.png 424w, https://substackcdn.com/image/fetch/$s_!XphY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf3ef87e-f504-458d-a68c-10bf20e53b9f_1900x548.png 848w, https://substackcdn.com/image/fetch/$s_!XphY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf3ef87e-f504-458d-a68c-10bf20e53b9f_1900x548.png 1272w, https://substackcdn.com/image/fetch/$s_!XphY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf3ef87e-f504-458d-a68c-10bf20e53b9f_1900x548.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XphY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf3ef87e-f504-458d-a68c-10bf20e53b9f_1900x548.png" width="1456" height="420" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/df3ef87e-f504-458d-a68c-10bf20e53b9f_1900x548.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:420,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:173922,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/192711223?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf3ef87e-f504-458d-a68c-10bf20e53b9f_1900x548.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!XphY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf3ef87e-f504-458d-a68c-10bf20e53b9f_1900x548.png 424w, https://substackcdn.com/image/fetch/$s_!XphY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf3ef87e-f504-458d-a68c-10bf20e53b9f_1900x548.png 848w, https://substackcdn.com/image/fetch/$s_!XphY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf3ef87e-f504-458d-a68c-10bf20e53b9f_1900x548.png 1272w, https://substackcdn.com/image/fetch/$s_!XphY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf3ef87e-f504-458d-a68c-10bf20e53b9f_1900x548.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The 3 levels don&#8217;t <em>strictly</em> have anything to do with concurrency: they&#8217;re more about how tightly you&#8217;re coupled to the main actor. From Xcode 26, new projects are opted into approachable concurrency and default MainActor isolation. </p><p>Clear as mud, right? </p><p>It&#8217;ll make sense when you read the article.</p><p>As always, I created a sample project that will allow you to play around with the threading debugger yourself. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://github.com/jacobsapps/The3Levels&quot;,&quot;text&quot;:&quot;Get the sample project&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://github.com/jacobsapps/The3Levels"><span>Get the sample project</span></a></p><div><hr></div><h2>Level 1: Main Actor 4 Life </h2><p>In understanding Approachable Concurrency, you have to understand the incentives and motivations of Apple Inc., the business.</p><p>The <em>target audience</em> for most Apple frameworks and features is the marginal developer. The one picking between SwiftUI and React Native, and most at risk of defecting to (grits teeth) Android or (shudder) <em>the web </em>if their needs aren&#8217;t met.</p><p>90% of budding indie devs don&#8217;t give a sh*t about performance, because a workout tracker, AI recipe planner, or fart app doesn&#8217;t need parallelism. It needs to work out of the box and find product-market fit.</p><p>By default, Swift now puts these devs in baby mode to protect them from themselves.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jfs5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadb33cae-1de7-433c-94cb-7da5f890dd7e_1280x726.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jfs5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadb33cae-1de7-433c-94cb-7da5f890dd7e_1280x726.jpeg 424w, https://substackcdn.com/image/fetch/$s_!jfs5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadb33cae-1de7-433c-94cb-7da5f890dd7e_1280x726.jpeg 848w, https://substackcdn.com/image/fetch/$s_!jfs5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadb33cae-1de7-433c-94cb-7da5f890dd7e_1280x726.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!jfs5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadb33cae-1de7-433c-94cb-7da5f890dd7e_1280x726.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jfs5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadb33cae-1de7-433c-94cb-7da5f890dd7e_1280x726.jpeg" width="1280" height="726" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/adb33cae-1de7-433c-94cb-7da5f890dd7e_1280x726.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:726,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:106572,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/192711223?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadb33cae-1de7-433c-94cb-7da5f890dd7e_1280x726.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jfs5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadb33cae-1de7-433c-94cb-7da5f890dd7e_1280x726.jpeg 424w, https://substackcdn.com/image/fetch/$s_!jfs5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadb33cae-1de7-433c-94cb-7da5f890dd7e_1280x726.jpeg 848w, https://substackcdn.com/image/fetch/$s_!jfs5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadb33cae-1de7-433c-94cb-7da5f890dd7e_1280x726.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!jfs5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadb33cae-1de7-433c-94cb-7da5f890dd7e_1280x726.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The safest possible starting point is a single-threaded app. And most apps don&#8217;t actually <em>need</em> much more than that.</p><p>Users are happy because random concurrency bugs don&#8217;t ruin their experience; and devs are happy because they get to keep 69%** of the cash spent on their app (after the 30% Apple tax and the 1% RevenueCat fee*).</p><blockquote><p><em>*<a href="https://www.revenuecat.com">RevenueCat</a>, please sponsor my blog. Oh wait.</em></p><p><em>**Nice.</em></p></blockquote><p>Serial main actor execution is the first-class mode in Swift 6.2.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Fv79!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee03450a-5011-44b2-b79e-50c154844cbe_2230x1084.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Fv79!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee03450a-5011-44b2-b79e-50c154844cbe_2230x1084.png 424w, https://substackcdn.com/image/fetch/$s_!Fv79!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee03450a-5011-44b2-b79e-50c154844cbe_2230x1084.png 848w, https://substackcdn.com/image/fetch/$s_!Fv79!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee03450a-5011-44b2-b79e-50c154844cbe_2230x1084.png 1272w, https://substackcdn.com/image/fetch/$s_!Fv79!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee03450a-5011-44b2-b79e-50c154844cbe_2230x1084.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Fv79!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee03450a-5011-44b2-b79e-50c154844cbe_2230x1084.png" width="1456" height="708" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ee03450a-5011-44b2-b79e-50c154844cbe_2230x1084.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:708,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:628241,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/192711223?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee03450a-5011-44b2-b79e-50c154844cbe_2230x1084.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Fv79!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee03450a-5011-44b2-b79e-50c154844cbe_2230x1084.png 424w, https://substackcdn.com/image/fetch/$s_!Fv79!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee03450a-5011-44b2-b79e-50c154844cbe_2230x1084.png 848w, https://substackcdn.com/image/fetch/$s_!Fv79!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee03450a-5011-44b2-b79e-50c154844cbe_2230x1084.png 1272w, https://substackcdn.com/image/fetch/$s_!Fv79!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee03450a-5011-44b2-b79e-50c154844cbe_2230x1084.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Really! Check out the sample project and try to run non-async code off-main in Level 1. It&#8217;s impossible. <em><a href="https://blog.jacobstechtavern.com/i/148591941/why-did-you-only-say-the-standard-behaviour">Erm, mostly</a>.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://github.com/jacobsapps/The3Levels&quot;,&quot;text&quot;:&quot;Prove me wrong&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://github.com/jacobsapps/The3Levels"><span>Prove me wrong</span></a></p><p>Concurrent mutation of shared state, and data races more broadly, are rendered impossible. This serialised code is also easy to reason about: everything runs on the main actor, so you can shut up and ship.</p><blockquote><p><em>If you want to get to grips with actors, tasks, executors, and the underlying cooperative thread pool, <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course?open=false#&#167;how-swift-concurrency-works-under-the-hood">this post</a> is a great place to begin.</em></p></blockquote><div><hr></div><h2>Level 2: Async <em>and</em> Serial</h2><p>Look, this is probably the trickiest part to get your head around. But, basically, in Level 2, your Swift code turns into JavaScript. I know. The horror.</p><p>We introduce async operations, but all our code, and critically, our data models, remain single-threaded, isolated to the main actor. </p><p>This is the really important bit: </p><div class="callout-block" data-callout="true"><p><em>Upgrade to unlock this article, plus much more:</em></p><p><em>&#127775; Access <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, my exclusive advanced content <br>&#128640; Read <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> a month before anyone else <br>&#129525; Master concurrency with my <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course">full course</a> and <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced training</a><br>&#129489;&#8205;&#128640; Get a free copy of my new eBook, &#8220;<a href="https://payhip.com/b/tvoug">Land your iOS Tech Job</a>&#8221;</em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p>
      <p>
          <a href="https://blog.jacobstechtavern.com/p/3-levels-of-concurrency">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[URLSession to Electrons: How Networking works on iOS]]></title><description><![CDATA[A theoretical deep-dive into how the internet happens via your iPhone]]></description><link>https://blog.jacobstechtavern.com/p/urlsession-to-electrons</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/urlsession-to-electrons</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Tue, 28 Apr 2026 15:03:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!OyKR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2a288-86f6-4fe7-b09a-b7e3d6326a98_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OyKR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2a288-86f6-4fe7-b09a-b7e3d6326a98_1680x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OyKR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2a288-86f6-4fe7-b09a-b7e3d6326a98_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!OyKR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2a288-86f6-4fe7-b09a-b7e3d6326a98_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!OyKR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2a288-86f6-4fe7-b09a-b7e3d6326a98_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!OyKR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2a288-86f6-4fe7-b09a-b7e3d6326a98_1680x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OyKR!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2a288-86f6-4fe7-b09a-b7e3d6326a98_1680x1200.png" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8ae2a288-86f6-4fe7-b09a-b7e3d6326a98_1680x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:3873791,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2a288-86f6-4fe7-b09a-b7e3d6326a98_1680x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!OyKR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2a288-86f6-4fe7-b09a-b7e3d6326a98_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!OyKR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2a288-86f6-4fe7-b09a-b7e3d6326a98_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!OyKR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2a288-86f6-4fe7-b09a-b7e3d6326a98_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!OyKR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2a288-86f6-4fe7-b09a-b7e3d6326a98_1680x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>One of the reasons I reckon I&#8217;m a decent writer is that I can remember what it&#8217;s like to be very junior. Noob-y mistakes were my bread and butter. I hailed from the <em>&#8220;no question is a stupid question&#8221;</em> school of thought, and had zero filter when I felt blocked.</p><p>These traits combined to make me very annoying to Josh and Si, our resident seniors. My relentless requests for help were invariably met with some variant of:</p><ul><li><p><em>&#8220;You forgot to assign the <strong>UITableViewDataSource</strong>, didn&#8217;t you?&#8221;</em></p></li><li><p><em>&#8220;You didn&#8217;t set <strong>translatesAutoresizingMaskIntoConstraints = false</strong>&#8221;</em></p></li><li><p><em>&#8220;You have to call <strong>.resume()</strong> on that <strong>URLSessionDataTask</strong>&#8221;</em></p></li></ul><p>This wistful nostalgia trip got me thinking.</p><p>What <em>actually</em> <em>happens</em> when you call .resume() on a URLSessionDataTask?</p><p>The subsequent rabbit hole is quite fascinating, and required reading if you never stopped to wonder how <em>literally</em> <em>the entire internet works</em>.</p><p>So today is a theory lesson + case study.</p><p>We&#8217;re covering the conceptual model underpinning the vast network of networks that make up the internet.</p><p>Along the way, we&#8217;re going to follow the unassuming URLSessionDataTask as it traverses each layer of abstraction: from your app&#8217;s API request, to system frameworks, into the kernel, via drivers into the radio hardware, and finally out into the physical world as electromagnetic radiation.</p><blockquote><h6><strong>Sponsored Link</strong></h6><h4>Lessons Learned from Security Incidents in Mobile Apps</h4><p>Join Security Researcher and Pentester, Jan Seredynski, on a live stream on May 12 as he dissects recent real-world security incidents in banking, food delivery, and e-commerce. From face verification bypass to location spoofing, he'll break down the anatomy of a breach and what teams can do differently to address them. </p><p><a href="https://hubs.la/Q049VRcx0">Sign up here</a>.</p></blockquote><div><hr></div><h2>Contents</h2><ul><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/what-is-the-internet">What is the Internet?</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/urlsession-and-the-application-layer">URLSession and the Application Layer</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/urlsession">URLSession</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/resuming-the-datatask">Resuming the DataTask</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/http-dns-and-cookies">HTTP, DNS, and Cookies</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/networkframework-and-the-transport-layer">Network.framework &amp; the Transport layer</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/transport-layer-protocols">Transport Layer Protocols</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/segments-and-reliability">Segments and Reliability</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/networkframework">Network.framework</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/the-kernel-tcp-stack">The Kernel TCP Stack</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/ip-and-the-network-layer">IP and the Network layer</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/network-layer-datagrams">Network Layer Datagrams</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/forwarding-datagrams">Forwarding Datagrams</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/buffering-datagrams">Buffering Datagrams</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/network-layer-in-the-ios-kernel">Network Layer in the iOS kernel</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/the-link-layer-feat-wifi">The link layer (feat. Wi&#8209;Fi)</a> ()</p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/urlsession-at-this-layer">URLSession at this layer</a> ()</p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/electrons-and-the-physical-layer">Electrons and the Physical layer</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/iphone-hardware">iPhone hardware</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131196/last-orders">Last Orders</a></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2><strong>What is the Internet?</strong></h2><p>The internet is a global system of interconnected computer networks, with 2 major types of entity:</p><ul><li><p><strong>End systems</strong> (a.k.a. &#8220;hosts&#8221;). This might be an iPhone, a server in a data centre, or perhaps a very clever fridge.</p></li><li><p>The <strong>network core</strong>. This is a mesh of routers, packet switches, and <a href="https://en.wikipedia.org/wiki/Internet_exchange_point">IXP</a>s (internet exchange points) that play pass-the-parcel with packets of data.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AX5v!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff555eb2e-2db8-4dda-85d6-f70f7a83b485_1962x1338.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AX5v!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff555eb2e-2db8-4dda-85d6-f70f7a83b485_1962x1338.png 424w, https://substackcdn.com/image/fetch/$s_!AX5v!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff555eb2e-2db8-4dda-85d6-f70f7a83b485_1962x1338.png 848w, https://substackcdn.com/image/fetch/$s_!AX5v!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff555eb2e-2db8-4dda-85d6-f70f7a83b485_1962x1338.png 1272w, https://substackcdn.com/image/fetch/$s_!AX5v!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff555eb2e-2db8-4dda-85d6-f70f7a83b485_1962x1338.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AX5v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff555eb2e-2db8-4dda-85d6-f70f7a83b485_1962x1338.png" width="1456" height="993" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f555eb2e-2db8-4dda-85d6-f70f7a83b485_1962x1338.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:993,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:535986,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff555eb2e-2db8-4dda-85d6-f70f7a83b485_1962x1338.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AX5v!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff555eb2e-2db8-4dda-85d6-f70f7a83b485_1962x1338.png 424w, https://substackcdn.com/image/fetch/$s_!AX5v!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff555eb2e-2db8-4dda-85d6-f70f7a83b485_1962x1338.png 848w, https://substackcdn.com/image/fetch/$s_!AX5v!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff555eb2e-2db8-4dda-85d6-f70f7a83b485_1962x1338.png 1272w, https://substackcdn.com/image/fetch/$s_!AX5v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff555eb2e-2db8-4dda-85d6-f70f7a83b485_1962x1338.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">&#8220;Some pieces of the internet&#8221; &#8212; from <a href="https://gaia.cs.umass.edu/kurose_ross/index.php">Computer Networking: a top-down approach</a> </figcaption></figure></div><p>This <em>network core</em> includes the global backbone of the internet: an interconnected web of physical infrastructure like copper wire, fibre optic cable, and undersea cables carrying data between networks.</p><p>This lowest level of infra is operated by friendly, totally non-evil companies such as Verizon, AT&amp;T, and Google. The <em>interconnectivity</em> is key: the internet as we know it works because these companies all agree to route each other&#8217;s traffic.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!z_5U!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17fdffd9-bea6-4e28-aaf8-ed85e081011e_1600x901.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!z_5U!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17fdffd9-bea6-4e28-aaf8-ed85e081011e_1600x901.png 424w, https://substackcdn.com/image/fetch/$s_!z_5U!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17fdffd9-bea6-4e28-aaf8-ed85e081011e_1600x901.png 848w, https://substackcdn.com/image/fetch/$s_!z_5U!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17fdffd9-bea6-4e28-aaf8-ed85e081011e_1600x901.png 1272w, https://substackcdn.com/image/fetch/$s_!z_5U!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17fdffd9-bea6-4e28-aaf8-ed85e081011e_1600x901.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!z_5U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17fdffd9-bea6-4e28-aaf8-ed85e081011e_1600x901.png" width="1456" height="820" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/17fdffd9-bea6-4e28-aaf8-ed85e081011e_1600x901.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:820,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:178595,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17fdffd9-bea6-4e28-aaf8-ed85e081011e_1600x901.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!z_5U!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17fdffd9-bea6-4e28-aaf8-ed85e081011e_1600x901.png 424w, https://substackcdn.com/image/fetch/$s_!z_5U!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17fdffd9-bea6-4e28-aaf8-ed85e081011e_1600x901.png 848w, https://substackcdn.com/image/fetch/$s_!z_5U!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17fdffd9-bea6-4e28-aaf8-ed85e081011e_1600x901.png 1272w, https://substackcdn.com/image/fetch/$s_!z_5U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17fdffd9-bea6-4e28-aaf8-ed85e081011e_1600x901.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Map of undersea internet cables, from <a href="https://www.nytimes.com/interactive/2019/03/10/technology/internet-cables-oceans.html">The New York Times</a></figcaption></figure></div><p>The networks are compatible because they all speak to each other via IP, the <strong>internet protocol</strong>. This is the most fundamental thing to understand. A <em>protocol</em> is simply a specified format for sending and receiving messages. These formats are agreed via an &#8220;RFC&#8221; process run by a shadow cabal, the <a href="https://www.ietf.org/process/rfcs/">Internet Engineering Task Force</a>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KCDZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f91d4e8-21e5-4db8-be82-dca95d340e27_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KCDZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f91d4e8-21e5-4db8-be82-dca95d340e27_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!KCDZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f91d4e8-21e5-4db8-be82-dca95d340e27_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!KCDZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f91d4e8-21e5-4db8-be82-dca95d340e27_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!KCDZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f91d4e8-21e5-4db8-be82-dca95d340e27_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KCDZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f91d4e8-21e5-4db8-be82-dca95d340e27_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2f91d4e8-21e5-4db8-be82-dca95d340e27_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2921019,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f91d4e8-21e5-4db8-be82-dca95d340e27_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KCDZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f91d4e8-21e5-4db8-be82-dca95d340e27_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!KCDZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f91d4e8-21e5-4db8-be82-dca95d340e27_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!KCDZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f91d4e8-21e5-4db8-be82-dca95d340e27_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!KCDZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f91d4e8-21e5-4db8-be82-dca95d340e27_1536x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="http://1997.webhistory.org/www.lists/www-talk.1993q1/0182.html">Proposed new tag: IMG</a></figcaption></figure></div><p>Routers forward packets between each other as data traverses this physical system of cables, fibre, and radio links to their destination; from your iPhone in the UK, through to a VPN server in Sweden, down to an edge cache in Germany to retrieve your favourite schei&#223;e video (and back).</p><p>To understand how we go from URLRequest to a streamed .mp4, we follow the classic five-layer Internet model:</p><ul><li><p>application</p></li><li><p>transport</p></li><li><p>network</p></li><li><p>link</p></li><li><p>physical</p></li></ul><p>The layered model is all about <strong>abstractions</strong>. </p><p>The application layer worries not about the underlying orchestration of packet encapsulation and transport links. It might as well be magic. <strong>Who cares?</strong> Data go into pipe, data come out of pipe. </p><p>This <em>&#8220;who cares&#8221;</em> powers the entire global software ecosystem, preventing lowly web developers going insane when confronted with manmade horrors beyond comprehension (like ethernet ports).</p><p>Abstraction saves you from understanding implementation details of each layer. You just need to know the protocol, that is, the format of data in and out. Abstraction is everywhere. It&#8217;s why you&#8217;re able to ship profitable SwiftUI apps without understanding the low-level process memory management done via a red-black tree inside the XNU kernel. <a href="https://blog.jacobstechtavern.com/p/what-is-a-crash">Whoooooo</a>. <a href="https://blog.jacobstechtavern.com/p/swift-reference-counting">Cares</a>.</p><p>Let&#8217;s investigate each layer, step-by-step, looking at real code to understand as we go.</p><div><hr></div><h2><strong>URLSession and the Application Layer</strong></h2><p>The application layer is where all the <em>interesting</em> stuff around the network can be done. It contains HTTP, DNS, cookies, caches, configuration, and everything else you actually touch in your day-to-day.</p><h4><strong>URLSession</strong></h4><p>URLSession is your entry-point into this world. To handle a run-of-the-mill network request, you&#8217;ll create a session, configure it, set up a task, and kick it off with resume().</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eBVf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7901a2f-5105-409b-a085-44f10d567530_3370x1838.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eBVf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7901a2f-5105-409b-a085-44f10d567530_3370x1838.png 424w, https://substackcdn.com/image/fetch/$s_!eBVf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7901a2f-5105-409b-a085-44f10d567530_3370x1838.png 848w, https://substackcdn.com/image/fetch/$s_!eBVf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7901a2f-5105-409b-a085-44f10d567530_3370x1838.png 1272w, https://substackcdn.com/image/fetch/$s_!eBVf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7901a2f-5105-409b-a085-44f10d567530_3370x1838.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eBVf!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7901a2f-5105-409b-a085-44f10d567530_3370x1838.png" width="1200" height="654.3956043956044" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b7901a2f-5105-409b-a085-44f10d567530_3370x1838.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:794,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:1106751,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7901a2f-5105-409b-a085-44f10d567530_3370x1838.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eBVf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7901a2f-5105-409b-a085-44f10d567530_3370x1838.png 424w, https://substackcdn.com/image/fetch/$s_!eBVf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7901a2f-5105-409b-a085-44f10d567530_3370x1838.png 848w, https://substackcdn.com/image/fetch/$s_!eBVf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7901a2f-5105-409b-a085-44f10d567530_3370x1838.png 1272w, https://substackcdn.com/image/fetch/$s_!eBVf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7901a2f-5105-409b-a085-44f10d567530_3370x1838.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://github.com/swiftlang/swift-corelibs-foundation/blob/main/Sources/FoundationNetworking/URLSession/URLSession.swift#L229">URLSession.swift</a></figcaption></figure></div><blockquote><p><em>p.s. I am using the handy open-source <a href="https://github.com/swiftlang/swift-corelibs-foundation/tree/main/Sources/FoundationNetworking">FoundationNetworking</a> library here, which relies on <a href="https://github.com/curl/curl">curl</a> rather than <a href="https://github.com/apple-opensource/CFNetwork/tree/master">CFNetwork</a>. </em></p></blockquote><p>Internally, URLSession uses both Grand Central Dispatch and NSOperation to avoid data races, using GCD queues to protect its internal state, and operations to handle URLSessionDelegate callbacks.</p><h4><strong>Resuming the DataTask</strong></h4><p>Individual requests are created and executed using a URLSessionDataTask. This calls into the underlying implementation library <em>(curl or CFNetwork)</em> and feeds data back to the session. The task tracks its state, counts bytes, and finishes with either a <strong>URLResponse</strong> or an <strong>Error</strong>.</p><p>This data task gives devs the opportunity to configure the request before work begins. It inits in a suspended state, kicking off when <strong>resume()</strong> is called.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!J_Kz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb403442f-fa7c-47d9-a6b7-5f095d8b8dbf_3044x1704.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!J_Kz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb403442f-fa7c-47d9-a6b7-5f095d8b8dbf_3044x1704.png 424w, https://substackcdn.com/image/fetch/$s_!J_Kz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb403442f-fa7c-47d9-a6b7-5f095d8b8dbf_3044x1704.png 848w, https://substackcdn.com/image/fetch/$s_!J_Kz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb403442f-fa7c-47d9-a6b7-5f095d8b8dbf_3044x1704.png 1272w, https://substackcdn.com/image/fetch/$s_!J_Kz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb403442f-fa7c-47d9-a6b7-5f095d8b8dbf_3044x1704.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!J_Kz!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb403442f-fa7c-47d9-a6b7-5f095d8b8dbf_3044x1704.png" width="1200" height="671.7032967032967" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b403442f-fa7c-47d9-a6b7-5f095d8b8dbf_3044x1704.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:815,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:854587,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb403442f-fa7c-47d9-a6b7-5f095d8b8dbf_3044x1704.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!J_Kz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb403442f-fa7c-47d9-a6b7-5f095d8b8dbf_3044x1704.png 424w, https://substackcdn.com/image/fetch/$s_!J_Kz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb403442f-fa7c-47d9-a6b7-5f095d8b8dbf_3044x1704.png 848w, https://substackcdn.com/image/fetch/$s_!J_Kz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb403442f-fa7c-47d9-a6b7-5f095d8b8dbf_3044x1704.png 1272w, https://substackcdn.com/image/fetch/$s_!J_Kz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb403442f-fa7c-47d9-a6b7-5f095d8b8dbf_3044x1704.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://github.com/swiftlang/swift-corelibs-foundation/blob/main/Sources/FoundationNetworking/URLSession/URLSessionTask.swift#L473">URLSessionTask.swift</a></figcaption></figure></div><p><a href="http://sendAsynchronousRequest">The async/await form</a> conveniently handles both task creation and <strong>resume()</strong> internally. It&#8217;s truly nothing special, wrapping the O.G. <strong>dataTask(with: URLRequest)</strong> function in <strong>withCheckedThrowingContinuation</strong>.</p><h4><strong>HTTP, DNS, and Cookies </strong></h4><p>In the application layer, network requests often have a human-readable format, such as the ubiquitous HTTP request.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RwR6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cfb2f70-f697-466b-928d-28736e7f4cc0_1516x552.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RwR6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cfb2f70-f697-466b-928d-28736e7f4cc0_1516x552.png 424w, https://substackcdn.com/image/fetch/$s_!RwR6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cfb2f70-f697-466b-928d-28736e7f4cc0_1516x552.png 848w, https://substackcdn.com/image/fetch/$s_!RwR6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cfb2f70-f697-466b-928d-28736e7f4cc0_1516x552.png 1272w, https://substackcdn.com/image/fetch/$s_!RwR6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cfb2f70-f697-466b-928d-28736e7f4cc0_1516x552.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RwR6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cfb2f70-f697-466b-928d-28736e7f4cc0_1516x552.png" width="1456" height="530" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2cfb2f70-f697-466b-928d-28736e7f4cc0_1516x552.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:530,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:127427,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cfb2f70-f697-466b-928d-28736e7f4cc0_1516x552.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RwR6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cfb2f70-f697-466b-928d-28736e7f4cc0_1516x552.png 424w, https://substackcdn.com/image/fetch/$s_!RwR6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cfb2f70-f697-466b-928d-28736e7f4cc0_1516x552.png 848w, https://substackcdn.com/image/fetch/$s_!RwR6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cfb2f70-f697-466b-928d-28736e7f4cc0_1516x552.png 1272w, https://substackcdn.com/image/fetch/$s_!RwR6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cfb2f70-f697-466b-928d-28736e7f4cc0_1516x552.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">From <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Messages">Mozilla</a></figcaption></figure></div><p>You can trivially instrument the application layer yourself: via Charles Proxy, Proxyman, or on the web, by right-clicking and tapping &#8220;inspect element&#8221;, then looking at the &#8220;Network&#8221; tab of the site debugger.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DC12!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d0044a8-e590-4549-8383-cdc05ad1476a_977x425.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DC12!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d0044a8-e590-4549-8383-cdc05ad1476a_977x425.png 424w, https://substackcdn.com/image/fetch/$s_!DC12!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d0044a8-e590-4549-8383-cdc05ad1476a_977x425.png 848w, https://substackcdn.com/image/fetch/$s_!DC12!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d0044a8-e590-4549-8383-cdc05ad1476a_977x425.png 1272w, https://substackcdn.com/image/fetch/$s_!DC12!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d0044a8-e590-4549-8383-cdc05ad1476a_977x425.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DC12!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d0044a8-e590-4549-8383-cdc05ad1476a_977x425.png" width="977" height="425" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5d0044a8-e590-4549-8383-cdc05ad1476a_977x425.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:425,&quot;width&quot;:977,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:89333,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d0044a8-e590-4549-8383-cdc05ad1476a_977x425.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DC12!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d0044a8-e590-4549-8383-cdc05ad1476a_977x425.png 424w, https://substackcdn.com/image/fetch/$s_!DC12!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d0044a8-e590-4549-8383-cdc05ad1476a_977x425.png 848w, https://substackcdn.com/image/fetch/$s_!DC12!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d0044a8-e590-4549-8383-cdc05ad1476a_977x425.png 1272w, https://substackcdn.com/image/fetch/$s_!DC12!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d0044a8-e590-4549-8383-cdc05ad1476a_977x425.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong><a href="https://en.wikipedia.org/wiki/Domain_Name_System">DNS</a></strong> is a distributed dictionary that maps URL hostnames to IP addresses. <strong>Caches</strong> on your URLSessionConfiguration help decide whether your request even needs to hit the network. <strong>Cookies</strong> attach metadata to stateless requests to help our server maintain a consistent user state. If you want a stateless request, you can use an <a href="https://developer.apple.com/documentation/foundation/urlsessionconfiguration/ephemeral">ephemeral</a> session configuration. </p><p>The curl and CFNetwork libraries handle lower-level details in the application layer such as multiplexing, which combines multiple HTTP streams onto the same TCP connection (see below), saving energy by reducing connection overhead.</p><p>Ultimately, these lower-level libraries run syscalls into the kernel such as <strong>connect</strong>, <strong>socket</strong>, <strong>send</strong>, and <strong>recv</strong>. This brings us down to the next layer.</p><div><hr></div><div class="callout-block" data-callout="true"><p><em>If you&#8217;re enjoying my post, subscribe free to join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week.</em></p><div><hr></div><p><em>Paid members get a lot more: </em></p><p><em>&#127775; Access <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, my exclusive advanced content <br>&#128640; Read <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> a month before anyone else <br>&#129525; Master concurrency with my <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course">full course</a> and <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced training</a><br>&#129489;&#8205;&#128640; Get a free copy of my new eBook, &#8220;<a href="https://payhip.com/b/tvoug">Land your iOS Tech Job</a>&#8221;</em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2><strong>Network.framework &amp; the Transport layer</strong></h2><p>The transport layer moves messages between end systems.</p><h4><strong>Transport Layer Protocols</strong></h4><p>I&#8217;ll jump ahead <em>very</em> briefly, because there&#8217;s one really important thing to understand about IP (in the layer below), that explains everything about transport layer protocols: </p><p><strong>IP is unreliable</strong>.</p><p>When a packet is sent with IP, there is no guarantee that it arrives to its destination, on time, or at all.</p><p>Now we know that, we can appreciate the 3 important protocols of the transport layer:</p><ul><li><p><strong>TCP</strong>, Transmission Control Protocol, is a system that creates a (pretty) reliable connection on top of IP by verifying that each message was sent. Most of the internet is built atop TCP/IP.</p></li><li><p><strong>UDP</strong>, user datagram protocol, is fire-and-forget. It&#8217;s simple and fast, and &#8220;good enough&#8221; for streaming live video calls and gaming.</p></li><li><p><strong>QUIC</strong>, quick UDP internet connections <em>(QUDPIC just sounded silly)</em>, is a modern protocol that powers <strong>fast and reliable</strong> connections on top of UDP. <em>Ask your backend engineers if they support HTTP/3 today!</em></p></li></ul><p>I&#8217;m going to resist the temptation to write another 12,000 word behemoth, and focus on explaining why TCP is interesting, and relate it to iOS.</p><h4>Segments and Reliability </h4><p>When sending an HTTP request via TCP, the request is split into segments, which add bookkeeping logic around the original request data.</p><pre><code>---------------------------- 32 bits ----------------------------
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Source Port          |       Destination Port        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sequence Number                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Acknowledgment Number                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data |           |U|A|P|R|S|F|                                |
| Offs | Reserved  |R|C|S|S|Y|I|           Window Size          |
| et   |           |G|K|H|T|N|N|                                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Checksum            |        Urgent Pointer         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Options (if Data Offset &gt; 5)               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Application Data                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+</code></pre><p>This bookkeeping includes sequence numbers, acknowledgements (ack), and checksums. When a segment is sent successfully, success is ack&#8217;d. TCP checks acks and &#8220;the lack of acks&#8221; to infer lost data segments for retransmission. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xgZd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a59986-4709-4637-8b7e-a0a154fe0d58_526x553.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xgZd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a59986-4709-4637-8b7e-a0a154fe0d58_526x553.webp 424w, https://substackcdn.com/image/fetch/$s_!xgZd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a59986-4709-4637-8b7e-a0a154fe0d58_526x553.webp 848w, https://substackcdn.com/image/fetch/$s_!xgZd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a59986-4709-4637-8b7e-a0a154fe0d58_526x553.webp 1272w, https://substackcdn.com/image/fetch/$s_!xgZd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a59986-4709-4637-8b7e-a0a154fe0d58_526x553.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xgZd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a59986-4709-4637-8b7e-a0a154fe0d58_526x553.webp" width="526" height="553" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e7a59986-4709-4637-8b7e-a0a154fe0d58_526x553.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:553,&quot;width&quot;:526,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:20326,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a59986-4709-4637-8b7e-a0a154fe0d58_526x553.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xgZd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a59986-4709-4637-8b7e-a0a154fe0d58_526x553.webp 424w, https://substackcdn.com/image/fetch/$s_!xgZd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a59986-4709-4637-8b7e-a0a154fe0d58_526x553.webp 848w, https://substackcdn.com/image/fetch/$s_!xgZd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a59986-4709-4637-8b7e-a0a154fe0d58_526x553.webp 1272w, https://substackcdn.com/image/fetch/$s_!xgZd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7a59986-4709-4637-8b7e-a0a154fe0d58_526x553.webp 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">TCP Retransmission, by <a href="https://www.gatevidyalay.com/tcp-retransmission-tcp-computer-networks/">Akshay Singhal</a></figcaption></figure></div><p>This is reconstructed into the original HTTP request on the receiving end system, and returns back an ultimate success response for our intrepid URLSessionDataTask.</p><p>Reliable doesn&#8217;t mean guaranteed. If Dick Dastardly snips your router&#8217;s ethernet cable, or blows up your local IXP with an implausibly large crate of TNT, the message won&#8217;t magically get delivered. </p><blockquote><p><em>This is explained best in Joel Spolsky&#8217;s classic <a href="https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/">the law of leaky abstractions</a>.</em></p></blockquote><p>In a beautiful symphony of collaboration that makes you wish for the good ol&#8217; days, <a href="https://en.wikipedia.org/wiki/TCP_congestion_control">TCP throttles the request</a> if it detects an abnormally slow receiver. This forms the basis for congestion control and traffic management for the entire Internet. Kum baya, my friend.</p><h4><strong>Network.framework</strong></h4><p>Foundation is abstracted well away from the transport layer, but we can absolutely play around with it using the lower-level <a href="https://developer.apple.com/documentation/network">Network framework</a>.</p><p>This gives devs access to transport-layer primitives like <a href="https://developer.apple.com/documentation/network/nwprotocoltcp">TCP</a>, <a href="https://developer.apple.com/documentation/network/nwprotocoludp">UDP</a>, and <a href="https://developer.apple.com/documentation/network/nwprotocolquic">QUIC</a>, allowing you to configure properties like message format, retries, timeouts, authentication, encryption, and state machines.</p><p>This is used by apps like <a href="https://core.telegram.org/mtproto/transports">Telegram</a> to implement custom application-layer protocols that offer end-to-end encryption, and transmit data over standard transport layer primitives. </p><h4><strong>The Kernel TCP Stack</strong></h4><p>Ultimately, these transport layer primitives are built at a lower-level: the OS. The kernel (XNU) implements the TCP/IP stack and handles the necessary segmentation, routing, and congestion control:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!shfs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff833abf9-d365-4b34-9b46-de3c0fee5065_1758x2152.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!shfs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff833abf9-d365-4b34-9b46-de3c0fee5065_1758x2152.png 424w, https://substackcdn.com/image/fetch/$s_!shfs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff833abf9-d365-4b34-9b46-de3c0fee5065_1758x2152.png 848w, https://substackcdn.com/image/fetch/$s_!shfs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff833abf9-d365-4b34-9b46-de3c0fee5065_1758x2152.png 1272w, https://substackcdn.com/image/fetch/$s_!shfs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff833abf9-d365-4b34-9b46-de3c0fee5065_1758x2152.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!shfs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff833abf9-d365-4b34-9b46-de3c0fee5065_1758x2152.png" width="1456" height="1782" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f833abf9-d365-4b34-9b46-de3c0fee5065_1758x2152.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1782,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:853509,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff833abf9-d365-4b34-9b46-de3c0fee5065_1758x2152.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!shfs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff833abf9-d365-4b34-9b46-de3c0fee5065_1758x2152.png 424w, https://substackcdn.com/image/fetch/$s_!shfs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff833abf9-d365-4b34-9b46-de3c0fee5065_1758x2152.png 848w, https://substackcdn.com/image/fetch/$s_!shfs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff833abf9-d365-4b34-9b46-de3c0fee5065_1758x2152.png 1272w, https://substackcdn.com/image/fetch/$s_!shfs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff833abf9-d365-4b34-9b46-de3c0fee5065_1758x2152.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/netinet/tcp_usrreq.c#L1483">xnu/bsd/netinet/tcp_usrreq.c</a></figcaption></figure></div><p>This ultimately leads us down to the Network layer, and the Elvis of networking protocols: <strong>Internet Protocol</strong>. </p><div><hr></div><h2><strong>IP and the Network layer</strong></h2><p>The network layer is responsible for moving packets of data (a.k.a. &#8220;datagrams&#8221;) from one end system to another. The packet traverses the network core by being forwarded between <strong>routers</strong>. </p><p>What does a router do? Two main things: </p><ul><li><p>Forwarding datagrams.</p></li><li><p>Buffering un-forwarded datagrams.</p></li></ul><h4><strong>Network Layer Datagrams</strong></h4><p>First, what is a datagram? </p><p>If you&#8217;re rolling IPv6 (weirdo), it looks like this:</p><pre><code>----------------------------- 32 bits ---------------------------
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version | Traffic Class |           Flow Label                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Payload Length         |  Next Header  |   Hop Limit   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Source Address (128 bits)               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Destination Address (128 bits)             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                   Extension Headers (optional)                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Payload (e.g. TCP)                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+</code></pre><p>IP has 2 key flavours, relating to the format of the source and destination addresses:</p><ul><li><p>IPv4, which looks like <strong>192.168.1.10</strong></p></li><li><p>IPv6, which looks like <strong>2001:db8:85a3:0:0:8a2e:370:7334</strong></p></li></ul><p>If your first reaction is total disgust at the IPv6 address, you would be correct. Workarounds like <a href="https://en.wikipedia.org/wiki/Network_address_translation">network address translation</a> allowed millions of devices to hide behind a single IPv4 address, thus kicking the <em>&#8220;there are only 4 billion possible IPv4 addresses&#8221;</em> can down the road indefinitely.</p><h4>Forwarding Datagrams</h4><p>Routers are linked together to multiple other routers, via copper cables, fibre, or ethernet, across network links, or within an IXP (more wires tbh). Each router has its own IP address. This address acts less like a postal address, and more like a coordinate, narrowing down the logical location of the end system across the whole network.</p><p>When network topology changes, routers re-construct a <strong>forwarding table</strong>: they read the IP address of each neighbouring router, and determine which IP ranges should be forwarded to which links.</p><p>As long as the network is stable, picking the next &#8220;hop&#8221; in the network is easy: routers ship the datagram on to the closest prefix-matched IP on their forwarding table.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zRwB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3c3ab85-2048-435e-81ed-6d8da6867eec_1494x1108.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zRwB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3c3ab85-2048-435e-81ed-6d8da6867eec_1494x1108.png 424w, https://substackcdn.com/image/fetch/$s_!zRwB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3c3ab85-2048-435e-81ed-6d8da6867eec_1494x1108.png 848w, https://substackcdn.com/image/fetch/$s_!zRwB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3c3ab85-2048-435e-81ed-6d8da6867eec_1494x1108.png 1272w, https://substackcdn.com/image/fetch/$s_!zRwB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3c3ab85-2048-435e-81ed-6d8da6867eec_1494x1108.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zRwB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3c3ab85-2048-435e-81ed-6d8da6867eec_1494x1108.png" width="1456" height="1080" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c3c3ab85-2048-435e-81ed-6d8da6867eec_1494x1108.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1080,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:255540,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3c3ab85-2048-435e-81ed-6d8da6867eec_1494x1108.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zRwB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3c3ab85-2048-435e-81ed-6d8da6867eec_1494x1108.png 424w, https://substackcdn.com/image/fetch/$s_!zRwB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3c3ab85-2048-435e-81ed-6d8da6867eec_1494x1108.png 848w, https://substackcdn.com/image/fetch/$s_!zRwB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3c3ab85-2048-435e-81ed-6d8da6867eec_1494x1108.png 1272w, https://substackcdn.com/image/fetch/$s_!zRwB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3c3ab85-2048-435e-81ed-6d8da6867eec_1494x1108.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">&#8220;Routing algorithms and forwarding tables&#8221; &#8212; from <a href="https://gaia.cs.umass.edu/kurose_ross/index.php">Computer Networking: a top-down approach</a> </figcaption></figure></div><p>Across dozens of links, the packet gets closer and closer to its destination until it arrives at the destination end system (or gets dropped).</p><h4>Buffering Datagrams</h4><p>If you haven&#8217;t read the title, you might think that slicing a TCP segment into IP datagrams is as low-level as we get. Ultimately, though, no spoilerinos, the electrons that encode bits are transmitted serially through the network.</p><p>A router needs the full packet before forwarding anything, so latency adds up with each hop between routers. When the output is busy sending another datagram, your packet is buffered in a queue.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vJ8d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bb6d55b-561f-426b-b771-cfbbbab0f7ee_1086x622.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vJ8d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bb6d55b-561f-426b-b771-cfbbbab0f7ee_1086x622.png 424w, https://substackcdn.com/image/fetch/$s_!vJ8d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bb6d55b-561f-426b-b771-cfbbbab0f7ee_1086x622.png 848w, https://substackcdn.com/image/fetch/$s_!vJ8d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bb6d55b-561f-426b-b771-cfbbbab0f7ee_1086x622.png 1272w, https://substackcdn.com/image/fetch/$s_!vJ8d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bb6d55b-561f-426b-b771-cfbbbab0f7ee_1086x622.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vJ8d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bb6d55b-561f-426b-b771-cfbbbab0f7ee_1086x622.png" width="1086" height="622" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1bb6d55b-561f-426b-b771-cfbbbab0f7ee_1086x622.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:622,&quot;width&quot;:1086,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:190028,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bb6d55b-561f-426b-b771-cfbbbab0f7ee_1086x622.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vJ8d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bb6d55b-561f-426b-b771-cfbbbab0f7ee_1086x622.png 424w, https://substackcdn.com/image/fetch/$s_!vJ8d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bb6d55b-561f-426b-b771-cfbbbab0f7ee_1086x622.png 848w, https://substackcdn.com/image/fetch/$s_!vJ8d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bb6d55b-561f-426b-b771-cfbbbab0f7ee_1086x622.png 1272w, https://substackcdn.com/image/fetch/$s_!vJ8d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bb6d55b-561f-426b-b771-cfbbbab0f7ee_1086x622.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">&#8220;Packet Switching&#8221; &#8212; from <a href="https://gaia.cs.umass.edu/kurose_ross/index.php">Computer Networking: a top-down approach</a> </figcaption></figure></div><p>IP is <em>best-effort</em>, rather than reliable: a network connection is only as fast as the slowest, most congested link, so your p99 network latency often stems from a single dodgy link across the network core. If the buffer is full, the packet can just get dropped.</p><p>This unreliability can be political as well as technical: <a href="https://arxiv.org/abs/1409.6526">peering disputes</a> between network operators have led to latency issues, and in the worst cases, &#8220;blackholes&#8221;, where a router intentionally discards traffic.</p><h4>Network Layer in the iOS kernel </h4><p>iOS has enforced <a href="https://developer.apple.com/support/ipv6/">IPv6 compatibility</a> for years. Probably a good thing, otherwise their <a href="https://en.wikipedia.org/wiki/IPhone#billion">device sales</a> would account for 75% of the total IPv4 address space. iOS devs really don&#8217;t touch the network layer, but we can track it down in the xnu kernel source:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oXMu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f52a53-29a9-421f-b2ff-2ecda04d495f_1720x2062.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oXMu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f52a53-29a9-421f-b2ff-2ecda04d495f_1720x2062.png 424w, https://substackcdn.com/image/fetch/$s_!oXMu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f52a53-29a9-421f-b2ff-2ecda04d495f_1720x2062.png 848w, https://substackcdn.com/image/fetch/$s_!oXMu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f52a53-29a9-421f-b2ff-2ecda04d495f_1720x2062.png 1272w, https://substackcdn.com/image/fetch/$s_!oXMu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f52a53-29a9-421f-b2ff-2ecda04d495f_1720x2062.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oXMu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f52a53-29a9-421f-b2ff-2ecda04d495f_1720x2062.png" width="1456" height="1746" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a6f52a53-29a9-421f-b2ff-2ecda04d495f_1720x2062.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1746,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:825432,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f52a53-29a9-421f-b2ff-2ecda04d495f_1720x2062.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oXMu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f52a53-29a9-421f-b2ff-2ecda04d495f_1720x2062.png 424w, https://substackcdn.com/image/fetch/$s_!oXMu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f52a53-29a9-421f-b2ff-2ecda04d495f_1720x2062.png 848w, https://substackcdn.com/image/fetch/$s_!oXMu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f52a53-29a9-421f-b2ff-2ecda04d495f_1720x2062.png 1272w, https://substackcdn.com/image/fetch/$s_!oXMu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f52a53-29a9-421f-b2ff-2ecda04d495f_1720x2062.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/netinet/ip_output.c#L292">xnu/bsd/netinet/ip_output.c</a></figcaption></figure></div><p>The kernel selects the outgoing interface using its routing table. From here, it hands packets down to the iPhone&#8217;s link layer: the network driver (Wi-Fi) or the baseband subsystem (cellular).</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>The link layer (feat. Wi&#8209;Fi)</h2><p>The network layer moves packets across the wider Internet, to a destination.</p><p>The link layer is far less ambitious. Its job is to move <em>&#8220;frames&#8221;</em> from one network element to the next adjacent <em>link</em> in the chain. Just one. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-fEs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3032f5bb-83f3-401e-8ce6-518e607572e6_1184x538.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-fEs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3032f5bb-83f3-401e-8ce6-518e607572e6_1184x538.png 424w, https://substackcdn.com/image/fetch/$s_!-fEs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3032f5bb-83f3-401e-8ce6-518e607572e6_1184x538.png 848w, https://substackcdn.com/image/fetch/$s_!-fEs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3032f5bb-83f3-401e-8ce6-518e607572e6_1184x538.png 1272w, https://substackcdn.com/image/fetch/$s_!-fEs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3032f5bb-83f3-401e-8ce6-518e607572e6_1184x538.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-fEs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3032f5bb-83f3-401e-8ce6-518e607572e6_1184x538.png" width="1184" height="538" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3032f5bb-83f3-401e-8ce6-518e607572e6_1184x538.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:538,&quot;width&quot;:1184,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:128891,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3032f5bb-83f3-401e-8ce6-518e607572e6_1184x538.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-fEs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3032f5bb-83f3-401e-8ce6-518e607572e6_1184x538.png 424w, https://substackcdn.com/image/fetch/$s_!-fEs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3032f5bb-83f3-401e-8ce6-518e607572e6_1184x538.png 848w, https://substackcdn.com/image/fetch/$s_!-fEs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3032f5bb-83f3-401e-8ce6-518e607572e6_1184x538.png 1272w, https://substackcdn.com/image/fetch/$s_!-fEs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3032f5bb-83f3-401e-8ce6-518e607572e6_1184x538.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">&#8220;Packet processing&#8221; &#8212; from <a href="https://gaia.cs.umass.edu/kurose_ross/index.php">Computer Networking: a top-down approach </a></figcaption></figure></div><p>For your iPhone, that next link may be:</p><ul><li><p>a Wi&#8209;Fi access point</p></li><li><p>a cellular base station</p></li><li><p>or perhaps you&#8217;re hot-spotting and your device <em>itself</em> is the link. </p></li></ul><p>This is your <strong>access network</strong>, the first leg that connects your device to the wider Internet. The link layer takes the IP datagram from the network layer and wraps it in a container, or <em>frame</em>, that includes just enough info to get it across the current link. </p><p>This info includes:</p><ul><li><p>Who should receive this frame; for WiFi/Ethernet, this is the MAC address.</p></li><li><p>Error detection bits to flag up data corruption and mangled frames.</p></li><li><p>Control metadata like sequence markers, priority, flags, or frame types.</p></li></ul><p>These frames differ based on how you are connected; ethernet (IEEE 802.3), cellular (LTE/5G), and WiFi (IEEE 802.11) all have their own protocols. The link layer also performs a lot of invisible labour, such as retrying these frames locally if they were lost. TCP hogs all the credit.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZVwc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa517e06-1cf4-47af-a832-8f50347c8016_960x158.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZVwc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa517e06-1cf4-47af-a832-8f50347c8016_960x158.png 424w, https://substackcdn.com/image/fetch/$s_!ZVwc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa517e06-1cf4-47af-a832-8f50347c8016_960x158.png 848w, https://substackcdn.com/image/fetch/$s_!ZVwc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa517e06-1cf4-47af-a832-8f50347c8016_960x158.png 1272w, https://substackcdn.com/image/fetch/$s_!ZVwc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa517e06-1cf4-47af-a832-8f50347c8016_960x158.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZVwc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa517e06-1cf4-47af-a832-8f50347c8016_960x158.png" width="960" height="158" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fa517e06-1cf4-47af-a832-8f50347c8016_960x158.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:158,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:27449,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa517e06-1cf4-47af-a832-8f50347c8016_960x158.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZVwc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa517e06-1cf4-47af-a832-8f50347c8016_960x158.png 424w, https://substackcdn.com/image/fetch/$s_!ZVwc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa517e06-1cf4-47af-a832-8f50347c8016_960x158.png 848w, https://substackcdn.com/image/fetch/$s_!ZVwc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa517e06-1cf4-47af-a832-8f50347c8016_960x158.png 1272w, https://substackcdn.com/image/fetch/$s_!ZVwc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa517e06-1cf4-47af-a832-8f50347c8016_960x158.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">802.11 MAC Frame, from <a href="https://commons.wikimedia.org/wiki/File%3A802.11_MAC_Frame.svg">Wikimedia Commons</a></figcaption></figure></div><p>Wi&#8209;Fi is a shared medium, meaning all the local devices occupy the same band of radio spectrum. Therefore, to avoid a prisoner&#8217;s dilemma of signal hogging, the protocol forces devices to wait and take turns when transmitting to the router. Therefore, WiFi throughput is often a function of the other devices on the network, as any parent of a gaming teenager knows while on a business video call. </p><p>With cellular, the base station tells you when you can transmit, and for what resources. What are you gonna do about it? Your cellular radio tends to hang around in a higher-power state after any burst of traffic, so batching up requests is kinder to battery life than constant little drips of network activity. </p><h4>URLSession at this layer</h4><p>I don&#8217;t even think our <strong>URLSessionDataTask</strong> knows what&#8217;s going on at this point. </p><p>The OS picked an interface, handed the packet to the relevant subsystem (cellular modem or WiFi driver), and your HTTP request has been mutilated beyond recognition, dismembered, and squeezed into a suitcase to hop to the next link.</p><div><hr></div><h2>Electrons and the Physical layer</h2><p>The final layer in our digital lasagna of abstractions is called the <em>physical</em> layer because it&#8217;s&#8230; uh, I actually don&#8217;t know why it&#8217;s called the physical layer.</p><p>You&#8217;ll be pleased to know that we basically don&#8217;t have any wanky container names like <em>packets</em> or <em>datagrams</em> or <em>frames</em> here; just <strong>bits</strong>. Bits that move from point A to point B.</p><p>Every abstraction bottoms out here, because data has to actually <em>exist</em>: a change of voltage pushing electrons (slowly) through a copper wire, a pulse of light bounced through a fibre optic cable, or an electromagnetic wave  &#822;y&#822;e&#822;e&#822;t&#822;e&#822;d&#822; cast aloft through the air.</p><h4>iPhone Hardware</h4><p>Your <strong>URLRequest</strong> ultimately becomes energy in the real world.</p><p>On your iPhone, the radio hardware accepts bits from higher layers, encodes them, maps them to symbols, modulates a carrier wave, amplifies the result, and sends it out through an antenna. The receiver in your WiFi router or local cell tower does the reverse, fighting noise, reflections, interference, distance, and <em>walls</em>. </p><p>The network request is no longer data: it&#8217;s encoded into an oscillating electric charge in radio circuitry, then an electromagnetic field produced inside an antenna, and then a spherical wave of microwave-frequency photons, propagating out from your device until eaten by a receiver.</p><p>As you can imagine, antenna design matters a lot to hardware engineers.</p><p>Recall iPhone 4. </p><p>The hardy steel rim lived a double life as a part of the antenna subsystem, meaning the way you held the phone could materially degrade the already-meagre 3G cell reception. Following this fiasco, Steve Jobs literally died from embarrassment.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7qWG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3460635-c922-4205-9905-7f0cbc394606_960x565.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7qWG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3460635-c922-4205-9905-7f0cbc394606_960x565.jpeg 424w, https://substackcdn.com/image/fetch/$s_!7qWG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3460635-c922-4205-9905-7f0cbc394606_960x565.jpeg 848w, https://substackcdn.com/image/fetch/$s_!7qWG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3460635-c922-4205-9905-7f0cbc394606_960x565.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!7qWG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3460635-c922-4205-9905-7f0cbc394606_960x565.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7qWG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3460635-c922-4205-9905-7f0cbc394606_960x565.jpeg" width="960" height="565" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c3460635-c922-4205-9905-7f0cbc394606_960x565.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:565,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:94232,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3460635-c922-4205-9905-7f0cbc394606_960x565.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7qWG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3460635-c922-4205-9905-7f0cbc394606_960x565.jpeg 424w, https://substackcdn.com/image/fetch/$s_!7qWG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3460635-c922-4205-9905-7f0cbc394606_960x565.jpeg 848w, https://substackcdn.com/image/fetch/$s_!7qWG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3460635-c922-4205-9905-7f0cbc394606_960x565.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!7qWG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3460635-c922-4205-9905-7f0cbc394606_960x565.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">iPhone 4 (DO NOT HOLD DURING PHONE CALLS), from <a href="https://commons.wikimedia.org/wiki/File%3AIPhone_4_back_and_sides.JPG">Wikimedia Commons</a></figcaption></figure></div><p>Modern radios are adaptive f*ckers. They adjust their modulation and coding based on channel quality. In a clean signal environment, they can apply faster, denser schemes to push more data. In a noisy signal environment, they back off to slower, more robust schemes so the bits still squeeze through. Chuck in multiple antennas, MIMO, beamforming, and digital signal processing, and phones are subsequently pulling in gigabit ranges per second.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CUtq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22ddf3b-ab62-46bf-8c3a-a1dbee6cdcc8_960x264.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CUtq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22ddf3b-ab62-46bf-8c3a-a1dbee6cdcc8_960x264.png 424w, https://substackcdn.com/image/fetch/$s_!CUtq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22ddf3b-ab62-46bf-8c3a-a1dbee6cdcc8_960x264.png 848w, https://substackcdn.com/image/fetch/$s_!CUtq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22ddf3b-ab62-46bf-8c3a-a1dbee6cdcc8_960x264.png 1272w, https://substackcdn.com/image/fetch/$s_!CUtq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22ddf3b-ab62-46bf-8c3a-a1dbee6cdcc8_960x264.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CUtq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22ddf3b-ab62-46bf-8c3a-a1dbee6cdcc8_960x264.png" width="960" height="264" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e22ddf3b-ab62-46bf-8c3a-a1dbee6cdcc8_960x264.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:264,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:21399,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22ddf3b-ab62-46bf-8c3a-a1dbee6cdcc8_960x264.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CUtq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22ddf3b-ab62-46bf-8c3a-a1dbee6cdcc8_960x264.png 424w, https://substackcdn.com/image/fetch/$s_!CUtq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22ddf3b-ab62-46bf-8c3a-a1dbee6cdcc8_960x264.png 848w, https://substackcdn.com/image/fetch/$s_!CUtq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22ddf3b-ab62-46bf-8c3a-a1dbee6cdcc8_960x264.png 1272w, https://substackcdn.com/image/fetch/$s_!CUtq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe22ddf3b-ab62-46bf-8c3a-a1dbee6cdcc8_960x264.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Signal modulation is simple and understandable, from <a href="https://commons.wikimedia.org/wiki/File%3AOfdm_modulating_diagram.png">Wikimedia Commons</a></figcaption></figure></div><div><hr></div><h2>Last Orders</h2><p>Ultimately, your app does not talk to &#8220;the server.&#8221; It cries into the endless void, through a Lovecraftian rat king of network links and routers.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1_y3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa207da4a-b56b-425e-9ceb-97eb771abb82_1200x787.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1_y3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa207da4a-b56b-425e-9ceb-97eb771abb82_1200x787.jpeg 424w, https://substackcdn.com/image/fetch/$s_!1_y3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa207da4a-b56b-425e-9ceb-97eb771abb82_1200x787.jpeg 848w, https://substackcdn.com/image/fetch/$s_!1_y3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa207da4a-b56b-425e-9ceb-97eb771abb82_1200x787.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!1_y3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa207da4a-b56b-425e-9ceb-97eb771abb82_1200x787.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1_y3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa207da4a-b56b-425e-9ceb-97eb771abb82_1200x787.jpeg" width="1200" height="787" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a207da4a-b56b-425e-9ceb-97eb771abb82_1200x787.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:787,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:572605,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa207da4a-b56b-425e-9ceb-97eb771abb82_1200x787.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!1_y3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa207da4a-b56b-425e-9ceb-97eb771abb82_1200x787.jpeg 424w, https://substackcdn.com/image/fetch/$s_!1_y3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa207da4a-b56b-425e-9ceb-97eb771abb82_1200x787.jpeg 848w, https://substackcdn.com/image/fetch/$s_!1_y3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa207da4a-b56b-425e-9ceb-97eb771abb82_1200x787.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!1_y3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa207da4a-b56b-425e-9ceb-97eb771abb82_1200x787.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Cthulhu, by <a href="https://www.instagram.com/andreewallin/">Andr&#233;e Wallin</a></figcaption></figure></div><p>Abstractions allow us to comprehend the incomprehensible without going insane.</p><ul><li><p>The application layer happily pretends to be speaking directly to a server via tin cans and string.</p></li><li><p>The transport layer does the hard work making sure segments actually arrive. </p></li><li><p>The network layer goes postal to get your data to its destination.</p></li><li><p>The link layer locates the next link as frames traverse between network nodes.</p></li><li><p>The physical layer is where abstraction stops and life starts.</p></li></ul><p>On its journey, requests are chopped, wrapped, addressed, buffered, retransmitted, routed, modulated, amplified, and chucked across the planet by machines that mostly agree to cooperate with each other. And, incredibly, it works.</p><p>Next time you all URLSessionDataTask.resume(), just remember: Internet go brr.</p><blockquote><h6><strong>Sponsored Link</strong></h6><h4>Lessons Learned from Security Incidents in Mobile Apps</h4><p>Join Security Researcher and Pentester, Jan Seredynski, on a live stream on May 12 as he dissects recent real-world security incidents in banking, food delivery, and e-commerce. From face verification bypass to location spoofing, he&#8217;ll break down the anatomy of a breach and what teams can do differently to address them. </p><p><a href="https://hubs.la/Q049VRcx0">Sign up here</a>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YLiN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7557961-20c7-4da5-ab01-34d3e1bea234_1200x675.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YLiN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7557961-20c7-4da5-ab01-34d3e1bea234_1200x675.jpeg 424w, https://substackcdn.com/image/fetch/$s_!YLiN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7557961-20c7-4da5-ab01-34d3e1bea234_1200x675.jpeg 848w, https://substackcdn.com/image/fetch/$s_!YLiN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7557961-20c7-4da5-ab01-34d3e1bea234_1200x675.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!YLiN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7557961-20c7-4da5-ab01-34d3e1bea234_1200x675.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YLiN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7557961-20c7-4da5-ab01-34d3e1bea234_1200x675.jpeg" width="1200" height="675" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e7557961-20c7-4da5-ab01-34d3e1bea234_1200x675.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:675,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:330808,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131196?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7557961-20c7-4da5-ab01-34d3e1bea234_1200x675.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YLiN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7557961-20c7-4da5-ab01-34d3e1bea234_1200x675.jpeg 424w, https://substackcdn.com/image/fetch/$s_!YLiN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7557961-20c7-4da5-ab01-34d3e1bea234_1200x675.jpeg 848w, https://substackcdn.com/image/fetch/$s_!YLiN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7557961-20c7-4da5-ab01-34d3e1bea234_1200x675.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!YLiN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7557961-20c7-4da5-ab01-34d3e1bea234_1200x675.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></blockquote><div class="callout-block" data-callout="true"><p><em>If you enjoyed my post, subscribe free to join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week.</em></p><div><hr></div><p><em>Paid members get a lot more: </em></p><p><em>&#127775; Access <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, my exclusive advanced content <br>&#128640; Read <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> a month before anyone else <br>&#129525; Master concurrency with my <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course">full course</a> and <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced training</a><br>&#129489;&#8205;&#128640; Get a free copy of my new eBook, &#8220;<a href="https://payhip.com/b/tvoug">Land your iOS Tech Job</a>&#8221;</em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[My agentic engineering workflow at an AI unicorn 🦄]]></title><description><![CDATA[Shipping fast at the cutting edge]]></description><link>https://blog.jacobstechtavern.com/p/ios-at-an-ai-unicorn</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/ios-at-an-ai-unicorn</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Tue, 21 Apr 2026 15:03:05 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Wfwr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa081aa63-9b3c-4e7c-b709-f8400b36b435_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Wfwr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa081aa63-9b3c-4e7c-b709-f8400b36b435_1680x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Wfwr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa081aa63-9b3c-4e7c-b709-f8400b36b435_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!Wfwr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa081aa63-9b3c-4e7c-b709-f8400b36b435_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!Wfwr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa081aa63-9b3c-4e7c-b709-f8400b36b435_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!Wfwr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa081aa63-9b3c-4e7c-b709-f8400b36b435_1680x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Wfwr!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa081aa63-9b3c-4e7c-b709-f8400b36b435_1680x1200.png" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a081aa63-9b3c-4e7c-b709-f8400b36b435_1680x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:1970868,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/191399791?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa081aa63-9b3c-4e7c-b709-f8400b36b435_1680x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Wfwr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa081aa63-9b3c-4e7c-b709-f8400b36b435_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!Wfwr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa081aa63-9b3c-4e7c-b709-f8400b36b435_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!Wfwr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa081aa63-9b3c-4e7c-b709-f8400b36b435_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!Wfwr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa081aa63-9b3c-4e7c-b709-f8400b36b435_1680x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Rate my setup.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!t38R!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75fd3817-180e-4f37-9c9c-e5e364d44b77_5712x4284.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!t38R!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75fd3817-180e-4f37-9c9c-e5e364d44b77_5712x4284.jpeg 424w, https://substackcdn.com/image/fetch/$s_!t38R!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75fd3817-180e-4f37-9c9c-e5e364d44b77_5712x4284.jpeg 848w, https://substackcdn.com/image/fetch/$s_!t38R!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75fd3817-180e-4f37-9c9c-e5e364d44b77_5712x4284.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!t38R!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75fd3817-180e-4f37-9c9c-e5e364d44b77_5712x4284.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!t38R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75fd3817-180e-4f37-9c9c-e5e364d44b77_5712x4284.jpeg" width="1456" height="1092" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/75fd3817-180e-4f37-9c9c-e5e364d44b77_5712x4284.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1092,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:4429143,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/191399791?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75fd3817-180e-4f37-9c9c-e5e364d44b77_5712x4284.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!t38R!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75fd3817-180e-4f37-9c9c-e5e364d44b77_5712x4284.jpeg 424w, https://substackcdn.com/image/fetch/$s_!t38R!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75fd3817-180e-4f37-9c9c-e5e364d44b77_5712x4284.jpeg 848w, https://substackcdn.com/image/fetch/$s_!t38R!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75fd3817-180e-4f37-9c9c-e5e364d44b77_5712x4284.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!t38R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75fd3817-180e-4f37-9c9c-e5e364d44b77_5712x4284.jpeg 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">From left to right: Wispr mic, clawdbot box, Chrome tabs, buttscratcher, screen wipes, 5 agent terminals, Xcode, Fidget toys, test device, AirPods</figcaption></figure></div><p>If you&#8217;ve been following my escapades for a hot minute, you&#8217;ll know that after <a href="https://blog.jacobstechtavern.com/p/interview-grind">my brief stint of independence</a>, I landed in <a href="https://www.granola.ai">Granola</a>, a hot London startup building a popular AI notetaker. We just <a href="https://www.granola.ai/blog/series-c">landed our Series C</a>, officially making us a unicorn &#129412;. </p><p>Now, sit down. I&#8217;m about to rock your world: <em>we use lots of AI</em>.</p><p>Our tiny mobile team punches well above our weight, shipping faster than I&#8217;d have dreamed possible back in November 2022 when ChatGPT launched <em>(has it only been 3ish years?!)</em>. </p><p>With my left hand, I wield a maxxed-out Claude Code subscription. With my right, a maxxed-out Codex subscription. The <em>overwhelming</em> majority of the code I ship <em>(yes, easily ~99%)</em> is written by an agent. This is, to use 2020 lingo, <em>the new normal</em>.</p><p>I&#8217;ve been mucking around with agents <a href="https://blog.jacobstechtavern.com/p/claude-code-productivity">since May last year</a>, but rolling multiple agents in parallel most workdays has honed my workflow substantially. Seriously though, I&#8217;m getting so much done. It&#8217;s almost unbelievable. </p><p>It&#8217;s absolutely not a strict measure of productivity, but I&#8217;m landing <strong>eight PRs a day</strong> on average.  </p><p>Nothing in this blog post is prescriptive: everyone has a workflow that works best for them. Some rip through Opus 4.7 credits in the terminal, some utilise the Cursor&#8217;s IDE for everything, some rock the Codex app. Many are gradually accelerating from single agent to multi (and beyond).</p><p>Our guiding philosophy? <em>Ship bricks.</em></p><p>I hope you find it interesting.</p><div><hr></div><h2>Contents</h2><ul><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/agents-running-for-hours">Agents running for hours</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/context-switching">Context Switching</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/feature-workflow">Feature Workflow</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/stacked-diffs">Stacked Diffs</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/planning">Planning</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/letting-it-rip">Letting it Rip</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/breaking-the-bottleneck">Breaking the Bottleneck</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/the-timeline">The Timeline</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/product-and-design">Parallel Workflows</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/product-and-design">Product &amp; Design</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/ui-work">UI work</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/debugging">Debugging</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/yolo-ing">YOLO-ing</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/handsfree-tooling">Handsfree Tooling</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/wisprflow">WisprFlow</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/slack-integrations">Slack Integrations</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/ui-work-and-mcp">UI work &amp; MCP</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/bash-shortcuts">Bash Shortcuts</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/cognitive-debt-and-downsides">Cognitive Debt &amp; Downsides</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/191399791/last-orders">Last Orders</a></p></li></ul><div><hr></div><h2>Agents running for hours </h2><p>Let&#8217;s get this one out of the way first, because I myself have been inflicted by impostor syndrome from the tech bros that tweet about this constantly. </p><p>I used to be incredulous about people who left agents running for a long time - or, worse - overnight, until I cracked it myself. And realised it&#8217;s nothing special at all:</p><ol><li><p>The best models (Codex/Opus/Mythos(?)) in the highest thinking mode take way longer than default settings, but make far fewer mistakes.</p></li><li><p>You need to set up verification on your agents so they can build, navigate through your app, log stuff, run tests, and perform fixes autonomously. This, again, takes ages but returns extremely trustworthy work.</p></li><li><p>You can set up agent rules that follow your workflow consistently, whether that&#8217;s worktrees, verification pathways, or a git strategy (more on this later). Often each step in a plan requires an extra verification run.</p></li></ol><p>This is why you go multi-agent. Not because you have severe ADHD <em>(<a href="https://blog.jacobstechtavern.com/p/adhd-vs-alarmkit">which I do</a>)</em>, but because when your agents are doing their job properly, these factors combine multiplicatively. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5PB0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F839fd451-4041-4efa-933a-7d35d7318b84_2218x776.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5PB0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F839fd451-4041-4efa-933a-7d35d7318b84_2218x776.png 424w, https://substackcdn.com/image/fetch/$s_!5PB0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F839fd451-4041-4efa-933a-7d35d7318b84_2218x776.png 848w, https://substackcdn.com/image/fetch/$s_!5PB0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F839fd451-4041-4efa-933a-7d35d7318b84_2218x776.png 1272w, https://substackcdn.com/image/fetch/$s_!5PB0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F839fd451-4041-4efa-933a-7d35d7318b84_2218x776.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5PB0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F839fd451-4041-4efa-933a-7d35d7318b84_2218x776.png" width="1456" height="509" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/839fd451-4041-4efa-933a-7d35d7318b84_2218x776.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:509,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:301581,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/191399791?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F839fd451-4041-4efa-933a-7d35d7318b84_2218x776.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5PB0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F839fd451-4041-4efa-933a-7d35d7318b84_2218x776.png 424w, https://substackcdn.com/image/fetch/$s_!5PB0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F839fd451-4041-4efa-933a-7d35d7318b84_2218x776.png 848w, https://substackcdn.com/image/fetch/$s_!5PB0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F839fd451-4041-4efa-933a-7d35d7318b84_2218x776.png 1272w, https://substackcdn.com/image/fetch/$s_!5PB0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F839fd451-4041-4efa-933a-7d35d7318b84_2218x776.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">This only says <strong>1h 01m 46s</strong> because it asked me for permissions, but it&#8217;s mostly been autonomously chugging through for the last 5 hours </figcaption></figure></div><p>The longest recent example I can recall was my Bitrise pipelines. Naturally, the remote tests were flaky, but my agent had access to the MCP. It could simply wait 20 minutes between each push and read the results. </p><p>As the lowly human in the loop, there was little for me to do but enter <strong>caffeinate</strong> and run it overnight. Waking up to a green build <em>(amongst the ashes of my Bitrise credits)</em> was a good <em>(if bittersweet)</em> time.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UDXE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0844ee59-23ad-4343-99a1-11ebdd63537e_2368x1102.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UDXE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0844ee59-23ad-4343-99a1-11ebdd63537e_2368x1102.png 424w, https://substackcdn.com/image/fetch/$s_!UDXE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0844ee59-23ad-4343-99a1-11ebdd63537e_2368x1102.png 848w, https://substackcdn.com/image/fetch/$s_!UDXE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0844ee59-23ad-4343-99a1-11ebdd63537e_2368x1102.png 1272w, https://substackcdn.com/image/fetch/$s_!UDXE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0844ee59-23ad-4343-99a1-11ebdd63537e_2368x1102.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UDXE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0844ee59-23ad-4343-99a1-11ebdd63537e_2368x1102.png" width="1456" height="678" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0844ee59-23ad-4343-99a1-11ebdd63537e_2368x1102.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:678,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1840675,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/191399791?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0844ee59-23ad-4343-99a1-11ebdd63537e_2368x1102.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UDXE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0844ee59-23ad-4343-99a1-11ebdd63537e_2368x1102.png 424w, https://substackcdn.com/image/fetch/$s_!UDXE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0844ee59-23ad-4343-99a1-11ebdd63537e_2368x1102.png 848w, https://substackcdn.com/image/fetch/$s_!UDXE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0844ee59-23ad-4343-99a1-11ebdd63537e_2368x1102.png 1272w, https://substackcdn.com/image/fetch/$s_!UDXE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0844ee59-23ad-4343-99a1-11ebdd63537e_2368x1102.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>Context Switching</h4><p>This is the true downside of the multi-agent world. In an ideal world, agents will be lightning fast and you could run single-threaded. But when using the strongest models and longest thinking modes, latency management is a fundamental skill in this new world <em>(until the models get faster)</em>.</p><p>I have 6 <em>(and counting)</em> identical separate checkouts of our source repo, so agents can work on different tasks without stepping on each other&#8217;s toes. In order to get this to work with Xcode, we set up local derived data folders for each checkout, so xcodebuild doesn&#8217;t lock the local DB for each concurrent build.</p><p>I tried both the Claude and Codex apps, but frankly I prefer the terminal so I can more easily flit between models and tabs in the same terminal window. It admittedly also better serves my self-image as an elite hacker from the Matrix. Both good.</p><div><hr></div><h2>Feature Workflow</h2><p>This is the big one, okay? Here&#8217;s what you came for. I&#8217;ve been refining my workflow for working on new features pretty drastically. </p><div class="callout-block" data-callout="true"><p><em>I&#8217;ve shared the thesis, but paid members get the full operating manual: stacked diffs, my parallel-agent feature workflow, collaboration with product &amp; design, a superpowered debugging workflow, and a primer on managing cognitive debt.</em></p><p><em>Paid members also unlock <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, access <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> early, and get <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced concurrency training</a>.</em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe&quot;,&quot;text&quot;:&quot;Unlock the full workflow&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://blog.jacobstechtavern.com/subscribe"><span>Unlock the full workflow</span></a></p><blockquote><h4>Last chance to take advantage of my eBook sale &#129489;&#8205;&#127979;</h4><p><em>This week only, own my best work for $30 off!</em></p><p><em><strong>&#128213; Advanced Swift Concurrency Training</strong> is a real-work concurrency simulation, guiding you through 12 increasingly complex challenges, allowing you to apply and master practical concurrency knowledge. You get a certificate at the end. </em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://payhip.com/b/7G0BW&quot;,&quot;text&quot;:&quot;Advanced Concurrency Training ($25)&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://payhip.com/b/7G0BW"><span>Advanced Concurrency Training ($25)</span></a></p><p><em><strong>&#128211; Land Your iOS Tech Job</strong> is the novelisation of my epic job grind last year,  packed to the gills with practical advice to crush technical interviews and maximise your income. Get it before the market turns and/or the price jumps back up.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://payhip.com/b/tvoug&quot;,&quot;text&quot;:&quot;Land your iOS Tech Job ($19)&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://payhip.com/b/tvoug"><span>Land your iOS Tech Job ($19)</span></a></p></blockquote>
      <p>
          <a href="https://blog.jacobstechtavern.com/p/ios-at-an-ai-unicorn">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[The 7 Deadly Sins of Cargo Culting]]></title><description><![CDATA[How (not) to turn your startup into the next FAANG]]></description><link>https://blog.jacobstechtavern.com/p/the-7-deadly-sins-of-cargo-culting</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/the-7-deadly-sins-of-cargo-culting</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Tue, 14 Apr 2026 15:03:03 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!JBUS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c138f76-3eba-456b-9e01-9a91969ef930_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JBUS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c138f76-3eba-456b-9e01-9a91969ef930_1680x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JBUS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c138f76-3eba-456b-9e01-9a91969ef930_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!JBUS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c138f76-3eba-456b-9e01-9a91969ef930_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!JBUS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c138f76-3eba-456b-9e01-9a91969ef930_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!JBUS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c138f76-3eba-456b-9e01-9a91969ef930_1680x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JBUS!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c138f76-3eba-456b-9e01-9a91969ef930_1680x1200.png" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6c138f76-3eba-456b-9e01-9a91969ef930_1680x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:5350175,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185205106?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c138f76-3eba-456b-9e01-9a91969ef930_1680x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JBUS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c138f76-3eba-456b-9e01-9a91969ef930_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!JBUS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c138f76-3eba-456b-9e01-9a91969ef930_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!JBUS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c138f76-3eba-456b-9e01-9a91969ef930_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!JBUS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c138f76-3eba-456b-9e01-9a91969ef930_1680x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h5><strong>Sponsored Link</strong></h5><h4><strong><a href="https://www.revenuecat.com/state-of-subscription-apps/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=sosa-2026">How iOS apps actually make money</a></strong></h4><blockquote><p>RevenueCat&#8217;s <a href="https://www.revenuecat.com/state-of-subscription-apps/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=sosa-2026">State of Subscription Apps</a> report is out, analyzing 115,000+ subscription apps and more than $16B in revenue. Use it to benchmark your pricing, trials, and conversion rates against what&#8217;s actually working across the app economy.</p></blockquote><div><hr></div><p>The original <a href="https://en.wikipedia.org/wiki/Cargo_cult">cargo cult</a> came from World War II; electric boogaloo. Pacific tribes observed cargo planes distributing supplies &amp; food to soldiers. In short order, they began ritualistically copying military practices: marching about, building runways, and talking on fake radios. This imitation was done in the vain hope of summoning more planes, with more supplies.</p><p>It&#8217;s fun to point and laugh at the silly historical tidbit, until you realise that in tech, we often do the exact same thing.</p><p>&#8220;Cargo culting&#8221; in tech is when we observe and imitate the behaviour of top companies, without understanding the underlying reasoning. You know what I mean: OKRs. Dashboards. SCRUM. Story points.</p><p>The behaviour is at its most insidious in the engineering department. You aren&#8217;t just cosplaying as a big Silicon Valley swingin&#8217; d*ck, you&#8217;re actively kneecapping the productivity of your org, forever.</p><p>Distributed Microservices&#8482; is the most famous case study. <a href="https://www.allthingsdistributed.com/2007/10/amazons_dynamo.html">Popularised by Amazon</a> in the early 2000s <em>(when they had billions in sales and 40m customers)</em>. At scale. Desperately imitated by companies <em>(and sold by consultancies)</em> with microscopic sales and nano customers. <em>(Nah, no customers)</em>. Even Amazon is <a href="https://web.archive.org/web/20230504060528/https://www.primevideotech.com/video-streaming/scaling-up-the-prime-video-audio-video-monitoring-service-and-reducing-costs-by-90">seeing the light</a>.</p><p><strong>Complexity debt</strong> is orders of magnitude worse than tech debt, because you are paying it every time you touch your system.</p><p>It&#8217;s insidious because <strong>engineers </strong><em><strong><a href="https://grugbrain.dev">love</a></strong></em><strong><a href="https://grugbrain.dev"> introducing complexity</a></strong>. You need an iron fist to prevent them introducing the latest networking paradigm, shipping a proprietary UI rendering system, or re-architecting the app to RIBs <em>(sorry, <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Alex Bush&quot;,&quot;id&quot;:27258834,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/566faa25-1bc3-4c38-bf51-f3299d4c1c67_512x512.jpeg&quot;,&quot;uuid&quot;:&quot;88d3ea69-f0fa-4859-bc0c-4ed040ad16c8&quot;}" data-component-name="MentionToDOM"></span>)</em>.</p><div><hr></div><p>I&#8217;m deeply impressionable, and no stranger to the allure of the cargo cult. When I CTO&#8217;d my own startup, I made the decision to roll a <em>serverless</em> stack so we&#8217;d <em>scale 2 da moon &#128640;</em>, even though a $5 box could trivially handle our meagre DAUs.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;0d6602a9-5bae-4cc6-ab72-ab23151afeed&quot;,&quot;caption&quot;:&quot;Carbn defined my career. For 2 years, I was the tech team of a tiny climate-action startup. I built a mobile app, and multiple backend architectures, from scratch, with close to zero experience.<br /><br />At no point did I know for sure what I was doing. But that&#8217;s part of the fun.&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;The Terrible Technical Architecture of my First Startup&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:126930235,&quot;name&quot;:&quot;Jacob Bartlett&quot;,&quot;bio&quot;:&quot;Master iOS. Boost your salary. Join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week. Sign up free today!&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!s80e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feab1e065-dffc-4096-ad9e-826ddda8a6cd_1304x1304.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100}],&quot;post_date&quot;:&quot;2025-09-22T16:00:36.176Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!EXXD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac6089fc-a0e0-43e7-81b9-5285176e2cf8_1680x1200.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.jacobstechtavern.com/p/my-terrible-startup-architecture&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:173339372,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:19,&quot;comment_count&quot;:3,&quot;publication_id&quot;:1376173,&quot;publication_name&quot;:&quot;Jacob&#8217;s Tech Tavern&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LJp-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee402e25-4e20-4683-ba5f-20ca86eb2b43_512x512.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p>Today we&#8217;re focusing on mobile engineering, because I have a lot of war stories to draw on. And we&#8217;ll cover the full roster of cargo-culting deadly sins:</p><ul><li><p><strong>&#128081; Pride: </strong>Knowing better than Apple about UI frameworks</p></li><li><p><strong>&#129297; Greed</strong>: Everything must be available offline</p></li><li><p><strong>&#129512; Wrath: </strong>My architecture is bigger than yours</p></li><li><p><strong>&#9881;&#65039; Envy: </strong>We must adopt Google&#8217;s build system</p></li><li><p><strong>&#127814; Lust: </strong>Let&#8217;s make our networking stack polyamorous</p></li><li><p><strong>&#129316; Gluttony: </strong>Om-nom-nom all the modules</p></li><li><p><strong>&#9939;&#65039; Sloth:</strong> Automate all the things!</p></li></ul><p></p><div class="callout-block" data-callout="true"><p><em>If you like this article, subscribe free to join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week.</em></p><div><hr></div><p><em>Paid members get a lot more:</em></p><p><em>&#127775; Access <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, my exclusive advanced content <br>&#128640; Read <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> a month before anyone else <br>&#129525; Master concurrency with my <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course">full course</a> and <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced training</a><br>&#129489;&#8205;&#128640; Get a free copy of my new eBook, &#8220;<a href="https://payhip.com/b/tvoug">Land your iOS Tech Job</a>&#8221;<br>&#10084;&#65039;&#8205;&#129657; Support independent, sometimes funny, tech writing</em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2><strong>&#128081; Pride </strong></h2><h4>Knowing better than Apple about UI frameworks</h4><p>Apple gives you UIKit and SwiftUI. One&#8217;s performant, and one&#8217;s nice to write.</p><p>But we want to have our cake and eat it. If we re-write the app in <a href="https://github.com/hyperconnect/HypeUI">HypeUI</a>, we can get blazing-fast UIKit performance with easy SwiftUI-style syntax! Kind of.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2hHB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce12102a-19c7-4f27-b8cb-fe5d66a04091_2218x1724.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2hHB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce12102a-19c7-4f27-b8cb-fe5d66a04091_2218x1724.png 424w, https://substackcdn.com/image/fetch/$s_!2hHB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce12102a-19c7-4f27-b8cb-fe5d66a04091_2218x1724.png 848w, https://substackcdn.com/image/fetch/$s_!2hHB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce12102a-19c7-4f27-b8cb-fe5d66a04091_2218x1724.png 1272w, https://substackcdn.com/image/fetch/$s_!2hHB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce12102a-19c7-4f27-b8cb-fe5d66a04091_2218x1724.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2hHB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce12102a-19c7-4f27-b8cb-fe5d66a04091_2218x1724.png" width="1456" height="1132" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ce12102a-19c7-4f27-b8cb-fe5d66a04091_2218x1724.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1132,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:517081,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185205106?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce12102a-19c7-4f27-b8cb-fe5d66a04091_2218x1724.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2hHB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce12102a-19c7-4f27-b8cb-fe5d66a04091_2218x1724.png 424w, https://substackcdn.com/image/fetch/$s_!2hHB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce12102a-19c7-4f27-b8cb-fe5d66a04091_2218x1724.png 848w, https://substackcdn.com/image/fetch/$s_!2hHB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce12102a-19c7-4f27-b8cb-fe5d66a04091_2218x1724.png 1272w, https://substackcdn.com/image/fetch/$s_!2hHB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce12102a-19c7-4f27-b8cb-fe5d66a04091_2218x1724.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This is fun for side projects, but consider migrating your entire codebase:</p><ol><li><p>Now you have inconsistency between most screens across the codebase, slowing down every context switch.</p></li><li><p>Invents <em>years</em> of make-work to re-write screens that already work. </p></li></ol><p>Velocity suicide.</p><p>This is even worse in the age of AI: perhaps you know the framework inside and out. But the training data is scarce, and your agent will start to hallucinate like it&#8217;s 2022.</p><p>This is, in my experience, the deadliest sin. I&#8217;ve seen it slow feature development to a glacial crawl. If scroll performance is a problem, give UIKit a go. If it&#8217;s still a problem, simplify your UI.</p><div><hr></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2><strong>&#129297; Greed</strong></h2><h4>Everything must be available offline</h4><p>Sometimes you want everything. Offline-first architecture, total reliability, and sub-millisecond latency.</p><p>Over-zealous local persistence won&#8217;t kill you, but it&#8217;ll slow you down. Lots. The rubric for cargo culting is <em>&#8220;copy what Meta does&#8221;</em>, but even Meta doesn't bother doing this on your news feed!</p><p>There&#8217;s a dark, oft-whispered-about practice that&#8217;s even more harmful to your productivity than persisting everything: sync engines. Automatically ensuring the local user data is eternally kept up-to-date with the backend representation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uMPT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F920458fc-3a3c-4cad-a45c-b208e66ee9f9_936x424.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uMPT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F920458fc-3a3c-4cad-a45c-b208e66ee9f9_936x424.png 424w, https://substackcdn.com/image/fetch/$s_!uMPT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F920458fc-3a3c-4cad-a45c-b208e66ee9f9_936x424.png 848w, https://substackcdn.com/image/fetch/$s_!uMPT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F920458fc-3a3c-4cad-a45c-b208e66ee9f9_936x424.png 1272w, https://substackcdn.com/image/fetch/$s_!uMPT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F920458fc-3a3c-4cad-a45c-b208e66ee9f9_936x424.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uMPT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F920458fc-3a3c-4cad-a45c-b208e66ee9f9_936x424.png" width="936" height="424" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/920458fc-3a3c-4cad-a45c-b208e66ee9f9_936x424.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:424,&quot;width&quot;:936,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:90315,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185205106?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F920458fc-3a3c-4cad-a45c-b208e66ee9f9_936x424.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uMPT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F920458fc-3a3c-4cad-a45c-b208e66ee9f9_936x424.png 424w, https://substackcdn.com/image/fetch/$s_!uMPT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F920458fc-3a3c-4cad-a45c-b208e66ee9f9_936x424.png 848w, https://substackcdn.com/image/fetch/$s_!uMPT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F920458fc-3a3c-4cad-a45c-b208e66ee9f9_936x424.png 1272w, https://substackcdn.com/image/fetch/$s_!uMPT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F920458fc-3a3c-4cad-a45c-b208e66ee9f9_936x424.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">From <a href="https://aws.amazon.com/blogs/mobile/aws-appsync-offline-reference-architecture/">AWS AppSync offline reference architecture</a>. Not only was this a sync engine, it was built on f*cking GraphQL!</figcaption></figure></div><p>This might not sound that bad, until you try it. </p><p>You&#8217;re introducing distributed system problems to a f*cking client app! You better at least be rolling <em>&#8220;last write wins&#8221;</em>, or I&#8217;ll really kick off.</p><p>Look. Persisting some stuff is good.</p><p>You&#8217;ll usually want some caching. And some data is <em>great</em> to have locally for fast retrieval or offline availability. For some apps, keeping important user data like voice notes or documents offline is obviously a requirement. But for 96% of apps, 96% of data does not need to be persisted.</p><div><hr></div><h2><strong>&#129512; Wrath</strong></h2><h4>My architecture is bigger than yours</h4><p>We&#8217;ve all felt like this at some point. </p><p><em>I can&#8217;t believe they chose to run vanilla MVC for this app! All the interactions and navigation are run through a view controller extension in a different file! This is dumb. I could totally improve this by using MVVM+C.</em> </p><p>You&#8217;re not doing your job as a developer if you don&#8217;t think the people who originally built the software you&#8217;re maintaining were total morons.</p><p>But it&#8217;s dangerous when you actually try to change things.</p><p><strong>Consistency is a superpower for a codebase. </strong>Your devs can land on the folder for a screen, know which file does what, how the navigation works, where data is fetched, and where user interactions are handled. All the moving parts are easily searchable, making debugging, maintenance, and new feature work super straightforward.</p><p>Architectural churn destroys this hard-won institutional knowledge.</p><p>My advice? <strong>Pick an architecture and religiously stick to it.</strong> Unless you have non-overlapping feature teams who <em>never</em> touch each other&#8217;s systems, a-la Monzo&#8217;s famously laissez-faire <em>&#8220;let teams pick whatever&#8221;</em> strategy, architectural inconsistency will hurt you forever. Trust me, this creates <em>years</em> of tech debt.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nC-A!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91630056-67c6-4423-8a5e-7af70b1dfeab_610x300.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nC-A!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91630056-67c6-4423-8a5e-7af70b1dfeab_610x300.jpeg 424w, https://substackcdn.com/image/fetch/$s_!nC-A!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91630056-67c6-4423-8a5e-7af70b1dfeab_610x300.jpeg 848w, https://substackcdn.com/image/fetch/$s_!nC-A!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91630056-67c6-4423-8a5e-7af70b1dfeab_610x300.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!nC-A!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91630056-67c6-4423-8a5e-7af70b1dfeab_610x300.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nC-A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91630056-67c6-4423-8a5e-7af70b1dfeab_610x300.jpeg" width="610" height="300" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/91630056-67c6-4423-8a5e-7af70b1dfeab_610x300.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:300,&quot;width&quot;:610,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:15092,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185205106?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91630056-67c6-4423-8a5e-7af70b1dfeab_610x300.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nC-A!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91630056-67c6-4423-8a5e-7af70b1dfeab_610x300.jpeg 424w, https://substackcdn.com/image/fetch/$s_!nC-A!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91630056-67c6-4423-8a5e-7af70b1dfeab_610x300.jpeg 848w, https://substackcdn.com/image/fetch/$s_!nC-A!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91630056-67c6-4423-8a5e-7af70b1dfeab_610x300.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!nC-A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91630056-67c6-4423-8a5e-7af70b1dfeab_610x300.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Disclaimer: I actually don&#8217;t mind <a href="https://www.objc.io/issues/13-architecture/viper/">VIPER</a> that much.</figcaption></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2><strong>&#9881;&#65039; Envy</strong></h2><h4>We must adopt Google&#8217;s build system</h4><p>This is the bread-and-butter cargo culting justification. </p><blockquote><p><em>Oh no! Our build times are ticking up! Our dependency graph is getting a little heavy. Better consult my two amig&#243;s, Buck and Bazel! &#127964;&#65039;&#129312;</em></p></blockquote><p>This will achieve 3 things: </p><ul><li><p>It looks <em>phenomenal</em> on your CV.</p></li><li><p>You can&#8217;t be fired, because no-one else understands how to change the config.</p></li><li><p>Your build times are fixed, but nobody can really get anything else done. </p></li></ul><p>Google rolls a custom build system. Uber rolls a custom build system. Meta rolls a custom build system. What could possibly be different between your 100k-line project and their 100m-line project? Other than a paltry 99.9m lines of code?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!k_Ix!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F350ce273-9ea4-41cb-a99d-14ae7de5d64b_2790x1460.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!k_Ix!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F350ce273-9ea4-41cb-a99d-14ae7de5d64b_2790x1460.png 424w, https://substackcdn.com/image/fetch/$s_!k_Ix!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F350ce273-9ea4-41cb-a99d-14ae7de5d64b_2790x1460.png 848w, https://substackcdn.com/image/fetch/$s_!k_Ix!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F350ce273-9ea4-41cb-a99d-14ae7de5d64b_2790x1460.png 1272w, https://substackcdn.com/image/fetch/$s_!k_Ix!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F350ce273-9ea4-41cb-a99d-14ae7de5d64b_2790x1460.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!k_Ix!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F350ce273-9ea4-41cb-a99d-14ae7de5d64b_2790x1460.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/350ce273-9ea4-41cb-a99d-14ae7de5d64b_2790x1460.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:471697,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185205106?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F350ce273-9ea4-41cb-a99d-14ae7de5d64b_2790x1460.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!k_Ix!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F350ce273-9ea4-41cb-a99d-14ae7de5d64b_2790x1460.png 424w, https://substackcdn.com/image/fetch/$s_!k_Ix!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F350ce273-9ea4-41cb-a99d-14ae7de5d64b_2790x1460.png 848w, https://substackcdn.com/image/fetch/$s_!k_Ix!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F350ce273-9ea4-41cb-a99d-14ae7de5d64b_2790x1460.png 1272w, https://substackcdn.com/image/fetch/$s_!k_Ix!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F350ce273-9ea4-41cb-a99d-14ae7de5d64b_2790x1460.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">From <a href="https://github.com/bazel-ios/rules_ios">iOS Rules for Bazel</a>, over 1300 lines of&#8230; who even knows&#8230; and this is as simple as it gets.</figcaption></figure></div><p>Bazel was created by Google to solve Googley problems like <em>&#8220;git stopped working in our monorepo&#8221;</em>. These tools are designed to build your whole system and unify deployment across backend and frontend, but there&#8217;s a second level of this sin: deploying a hyper-complex build system for a single platform alone, negating the entire point.</p><p>Look. I love <a href="https://tuist.dev">Tuist</a>. They don&#8217;t pay me. Yet &#128527;. </p><blockquote><p><em><a href="https://blog.jacobstechtavern.com/p/the-great-connection-pool-meltdown">Pedro</a>, pls sponsor my Substack &#128591;</em></p></blockquote><p>It&#8217;s the everyman&#8217;s alternative build system, and solves problems like <em>&#8220;xcodeproj files suck arse&#8221;</em> or <em>&#8220;caching modules speeds up your builds a whole bunch&#8221;</em>, <strong>not</strong> <em>&#8220;our repo literally won&#8217;t fit on your hard drive&#8221;</em>.</p><p><em>Maaaaaybe</em> you can justify a hyperscale build system like Buck if you&#8217;re a team of ex-Facebookers building a company, and want to just use what you know. But you&#8217;re creating more work down the line: onboarding overhead for every new team member, forever, and a dramatic maintenance burden. Why take the hit?</p><div><hr></div><h2><strong>&#127814; Lust</strong></h2><h4>Let&#8217;s make our networking stack polyamorous</h4><p>When you study system design for the first time, you might think you can create the <em>optimal</em> system that&#8217;s good for everything by applying a range of networking stacks: </p><ul><li><p>REST where you need simplicity</p></li><li><p>GraphQL where you need flexibility</p></li><li><p>gRPC when you want to minimise latency </p></li></ul><p>Let&#8217;s be real.</p><p>YOU ARE NOT GOOGLE. You aren&#8217;t Google.</p><p>Ask your devops guys now. Seriously. How much are you spending on network I/O? What&#8217;s your p95 for fetching user info?</p><p>If you have less than a million customers, it&#8217;ll be <em>nothing. </em>Certainly trivial when compared to <em>real</em> infra costs like DB, compute, and storage. </p><p>Using the &#8220;optimal&#8221; approach for each given situation creates the worst of all worlds for people who actually have to touch the networking stack, because engineers have to re-learn the tooling for each paradigm every time they touch it.</p><p>The maintenance burden is real. These approaches sprout divergent error modes, caching semantics, auth patterns, and observability methods. If you&#8217;re serving advanced requirements like pagination, delta queries, or offline mode, you incur a combinatorial explosion with each stack handling them differently. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QU6i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff057f699-35f7-47f1-b912-65a8b20b71f8_1692x916.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QU6i!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff057f699-35f7-47f1-b912-65a8b20b71f8_1692x916.png 424w, https://substackcdn.com/image/fetch/$s_!QU6i!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff057f699-35f7-47f1-b912-65a8b20b71f8_1692x916.png 848w, https://substackcdn.com/image/fetch/$s_!QU6i!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff057f699-35f7-47f1-b912-65a8b20b71f8_1692x916.png 1272w, https://substackcdn.com/image/fetch/$s_!QU6i!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff057f699-35f7-47f1-b912-65a8b20b71f8_1692x916.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QU6i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff057f699-35f7-47f1-b912-65a8b20b71f8_1692x916.png" width="1456" height="788" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f057f699-35f7-47f1-b912-65a8b20b71f8_1692x916.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:788,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1861972,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185205106?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff057f699-35f7-47f1-b912-65a8b20b71f8_1692x916.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QU6i!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff057f699-35f7-47f1-b912-65a8b20b71f8_1692x916.png 424w, https://substackcdn.com/image/fetch/$s_!QU6i!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff057f699-35f7-47f1-b912-65a8b20b71f8_1692x916.png 848w, https://substackcdn.com/image/fetch/$s_!QU6i!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff057f699-35f7-47f1-b912-65a8b20b71f8_1692x916.png 1272w, https://substackcdn.com/image/fetch/$s_!QU6i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff057f699-35f7-47f1-b912-65a8b20b71f8_1692x916.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image source: <a href="https://www.instagram.com/p/DU3f8-mkkc6/">bloody Instagram,</a> for some reason </figcaption></figure></div><p><em><strong>&#9888;&#65039; Info Hazard Warning: Don&#8217;t let your resident architecture astronaut read below! &#9888;&#65039;</strong></em></p><p>Did you know you can build your own proprietary application-layer networking stacks with <a href="https://developer.apple.com/documentation/network">Network.framework</a> if you really want?</p><blockquote><p><em>Frankly I struggled to avoid putting &#8220;GraphQL&#8221; for this whole sin and taking an early lunch break, because I hate it, but I&#8217;m a professional. </em></p></blockquote><p>Stick to a stack. Keep it simple. Go fast.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2><strong>&#129316; Gluttony</strong></h2><h4>Om-nom-nom all the modules</h4><p>Look, it&#8217;s really good to modularise your app, in a <em>thoughtful</em> way. Build times go down, you can easily split up responsibility as your org grows, and you can make the app <em>more</em> simple. </p><p>But there can be too much of a good thing.</p><p>Investing in automation to spit out modules (or, these days, asking an agent to do it) is nice, but without due care it&#8217;s possible for your dependency graph to descend into the depths of spaghetti.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H_jj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e8a0a6-2622-4a37-8d7c-3b489535977f_2812x288.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H_jj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e8a0a6-2622-4a37-8d7c-3b489535977f_2812x288.png 424w, https://substackcdn.com/image/fetch/$s_!H_jj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e8a0a6-2622-4a37-8d7c-3b489535977f_2812x288.png 848w, https://substackcdn.com/image/fetch/$s_!H_jj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e8a0a6-2622-4a37-8d7c-3b489535977f_2812x288.png 1272w, https://substackcdn.com/image/fetch/$s_!H_jj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e8a0a6-2622-4a37-8d7c-3b489535977f_2812x288.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H_jj!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e8a0a6-2622-4a37-8d7c-3b489535977f_2812x288.png" width="1200" height="122.8021978021978" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/25e8a0a6-2622-4a37-8d7c-3b489535977f_2812x288.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:149,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:333451,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185205106?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e8a0a6-2622-4a37-8d7c-3b489535977f_2812x288.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!H_jj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e8a0a6-2622-4a37-8d7c-3b489535977f_2812x288.png 424w, https://substackcdn.com/image/fetch/$s_!H_jj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e8a0a6-2622-4a37-8d7c-3b489535977f_2812x288.png 848w, https://substackcdn.com/image/fetch/$s_!H_jj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e8a0a6-2622-4a37-8d7c-3b489535977f_2812x288.png 1272w, https://substackcdn.com/image/fetch/$s_!H_jj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e8a0a6-2622-4a37-8d7c-3b489535977f_2812x288.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">I&#8217;m telling you, this one isn&#8217;t even that bad. I&#8217;ve seen some sh*t.</figcaption></figure></div><p>Not sure what module a new screen fits into? Hell, just make a new one, for that single screen.</p><p>You can introduce another combinatorial explosion here where you introduce more than 1 submodule per module: after all, why not have an API module alongside each feature module? We need a test target, after all. And what about the service layer? Huh? You want an alternative service layer for our watch target? Why not! </p><p>It gets real messy real quick.</p><p>Modules are great! Use them. But keep your feature modules carefully scoped. Just be thoughtful when adding new stuff. Avoid your dependency graph turning into a Gordian Knot.</p><div><hr></div><h2><strong>&#9939;&#65039; Sloth</strong></h2><h4>Automate all the things!</h4><p>Automation is great. You should automate boring, repetitive, <em>routine</em> work as much as possible. </p><p>But, like this delicious, ice-cold Peroni I am drinking, it&#8217;s best enjoyed in moderation. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Vi6H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7237bf-34d0-491e-82c9-37c8319bbc76.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Vi6H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7237bf-34d0-491e-82c9-37c8319bbc76.heic 424w, https://substackcdn.com/image/fetch/$s_!Vi6H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7237bf-34d0-491e-82c9-37c8319bbc76.heic 848w, https://substackcdn.com/image/fetch/$s_!Vi6H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7237bf-34d0-491e-82c9-37c8319bbc76.heic 1272w, https://substackcdn.com/image/fetch/$s_!Vi6H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7237bf-34d0-491e-82c9-37c8319bbc76.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Vi6H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7237bf-34d0-491e-82c9-37c8319bbc76.heic" width="1456" height="1092" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4a7237bf-34d0-491e-82c9-37c8319bbc76.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1092,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1783503,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185205106?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7237bf-34d0-491e-82c9-37c8319bbc76.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Vi6H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7237bf-34d0-491e-82c9-37c8319bbc76.heic 424w, https://substackcdn.com/image/fetch/$s_!Vi6H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7237bf-34d0-491e-82c9-37c8319bbc76.heic 848w, https://substackcdn.com/image/fetch/$s_!Vi6H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7237bf-34d0-491e-82c9-37c8319bbc76.heic 1272w, https://substackcdn.com/image/fetch/$s_!Vi6H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7237bf-34d0-491e-82c9-37c8319bbc76.heic 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://peroniitalia.com/utm_source=jacobs_tech_tavern">Peroni</a>, pls sponsor my Substack &#128591;</figcaption></figure></div><p>Automation is a high-leverage activity. You can spend a day automating work that saves your team an hour a week. Think release CI, routine QA testing, or performing analysis on your analytics.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!J2vg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71b08245-2924-4d29-8245-8922557bc30e_571x464.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!J2vg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71b08245-2924-4d29-8245-8922557bc30e_571x464.png 424w, https://substackcdn.com/image/fetch/$s_!J2vg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71b08245-2924-4d29-8245-8922557bc30e_571x464.png 848w, https://substackcdn.com/image/fetch/$s_!J2vg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71b08245-2924-4d29-8245-8922557bc30e_571x464.png 1272w, https://substackcdn.com/image/fetch/$s_!J2vg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71b08245-2924-4d29-8245-8922557bc30e_571x464.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!J2vg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71b08245-2924-4d29-8245-8922557bc30e_571x464.png" width="571" height="464" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/71b08245-2924-4d29-8245-8922557bc30e_571x464.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:464,&quot;width&quot;:571,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Is It Worth the Time?&quot;,&quot;title&quot;:&quot;Don't forget the time you spend finding the chart to look up what you save. And the time spent reading this reminder about the time spent. And the time trying to figure out if either of those actually make sense. Remember, every second counts toward your life total, including these right now.&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Is It Worth the Time?" title="Don't forget the time you spend finding the chart to look up what you save. And the time spent reading this reminder about the time spent. And the time trying to figure out if either of those actually make sense. Remember, every second counts toward your life total, including these right now." srcset="https://substackcdn.com/image/fetch/$s_!J2vg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71b08245-2924-4d29-8245-8922557bc30e_571x464.png 424w, https://substackcdn.com/image/fetch/$s_!J2vg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71b08245-2924-4d29-8245-8922557bc30e_571x464.png 848w, https://substackcdn.com/image/fetch/$s_!J2vg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71b08245-2924-4d29-8245-8922557bc30e_571x464.png 1272w, https://substackcdn.com/image/fetch/$s_!J2vg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71b08245-2924-4d29-8245-8922557bc30e_571x464.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://xkcd.com/1205/">xkcd 1205</a></figcaption></figure></div><p>So what am I getting at? Why am I being a sourpuss?</p><p>Automation can go wrong when you start to default to it, before even proving something is routine: <em>&#8220;let&#8217;s make a devtool to enforce this rule we just thought of&#8221;</em>, or <em>&#8220;let&#8217;s use <a href="https://blog.jacobstechtavern.com/p/swift-subprocess">Swift subprocess</a> to wrap our build commands&#8221;</em>. Automation always feels like a high-leverage activity, but you are often introducing annoying, hard-to-kill overhead. </p><p>You also create a new maintenance vector: when you&#8217;re freezing random workflows in a hard-to-change CLI, everything grinds to a halt if suddenly you find yourself on the wrong Rust runtime version. </p><p>I think the root issue is premature optimisation: you don&#8217;t really need to set up codegen or a DSL to build simple stuff like analytics events or deep links. Now, instead of just <em>changing the thing</em>, you have to <em>re-learn how to use some tool</em> (this is a major part of why I dislike GraphQL).</p><p>I like to think that in the age of agents, this will become less of a problem. Claude Code, especially alongside an MCP, can often automate most routine tasks. But pessimistically, it can just as easily spit out a bash script that works, until it doesn't. Or, god forbid, a Git Hook.</p><p>Nobody wants to be the jerk that kills someone else&#8217;s automation project, and so you are usually stuck with these forever. Over-automation can backfire badly: devs can get both clever and sloppy with workarounds for an overly-pedantic suite.  </p><p>Many times have I intentionally squashed several tickets into a single PR to get around the annoying overhead of a ponderous, inflexible test suite <em>(that insists on running UI tests </em>and<em> a build)</em>.</p><p>What I&#8217;m really trying to get across is, trust your devs!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>The Golden Rule</h2><h4>When is it okay to Cargo cult? </h4><p>The insidious thing about cargo culting is that you can trick yourself into justifying it.</p><ul><li><p>You&#8217;re getting frame drops? Drop SwiftUI and find a UI framework that can handle your design. </p></li><li><p>Clean builds taking over 10 minutes? Re-architect to Buck immediately.</p></li><li><p>Engineers stepping on each other&#8217;s toes with MVVM architecture? Whip out VIPER for the ultimate separation of concerns.</p></li></ul><p>It&#8217;s incredibly easy to justify big-tech cargo-culting with a <em>&#8220;real business need&#8221;</em>, but often this is poorly thought through. You see the problem one step in front of you, but don&#8217;t see the death by a thousand maintenance cuts your decision will create in the medium-term.</p><p>Just consider whether you&#8217;re solving a problem, or cosplaying as one of the big boys. </p><p>The golden rule?</p><blockquote><p><em><strong>Try to understand the problems that each technique is designed to solve.</strong></em></p></blockquote><p>Big-tech solutions are for problems <strong>~two orders of magnitude bigger</strong> than most mobile teams, even really successful ones, ever hit.</p><p>As a heuristic, try not to be the smallest company you know that&#8217;s using the approach. But also, if you can find a smaller company doing it, find out <strong>why</strong>. </p><p>If a startup full of ex-Snapchatters is starting from scratch with Buck, they probably all know how to use it, and don&#8217;t want to learn something new, and are stoically accept the onboarding overhead for new team members in the future. </p><p>Facebook invented ComponentKit for the news feed because they had thousands of mobile engineers, dozens of UI components <em>(so cell reuse exploded memory)</em>, serious frame drops on a billon low-end devices, and spaghetti data-flow. UIKit simply wasn&#8217;t designed to handle these issues, because nobody had encountered these issues before. And I hate to tell you this, but you are (probably) not Facebook. </p><blockquote><p><em>If you are Facebook, might I interest you in my group subscriptions; 33% off?</em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/0b89fbd9&quot;,&quot;text&quot;:&quot;Get 33% off group subscriptions&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/0b89fbd9"><span>Get 33% off group subscriptions</span></a></p><div><hr></div><h2>Last Orders </h2><p>Back in 2020, my startup&#8217;s commercial co-founder insisted that our MVP works 100% offline. This constrained our options to AWS Amplify <em>(alone)</em>. I&#8217;m easy. It came with a free sync engine. But we had to use GraphQL. I dropped it for V2.</p><p>These cargo-culting deadly sins have a lot in common: they feel like they solve a problem now <em>(even if that problem is, &#8220;my CV isn&#8217;t exciting enough&#8221;)</em>, but create complexity and overhead for the rest of your team, forever.</p><p>Simplicity is a gift. That boring codebase will be equally boring 10 years from now, allowing the inexpensive AGI maintaining our work in the future to easily get their head around it. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h1NE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1acbea38-a580-48bd-bca4-60bf4e24472a_320x240.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h1NE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1acbea38-a580-48bd-bca4-60bf4e24472a_320x240.gif 424w, https://substackcdn.com/image/fetch/$s_!h1NE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1acbea38-a580-48bd-bca4-60bf4e24472a_320x240.gif 848w, https://substackcdn.com/image/fetch/$s_!h1NE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1acbea38-a580-48bd-bca4-60bf4e24472a_320x240.gif 1272w, https://substackcdn.com/image/fetch/$s_!h1NE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1acbea38-a580-48bd-bca4-60bf4e24472a_320x240.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h1NE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1acbea38-a580-48bd-bca4-60bf4e24472a_320x240.gif" width="320" height="240" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1acbea38-a580-48bd-bca4-60bf4e24472a_320x240.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:240,&quot;width&quot;:320,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:856898,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185205106?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1acbea38-a580-48bd-bca4-60bf4e24472a_320x240.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!h1NE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1acbea38-a580-48bd-bca4-60bf4e24472a_320x240.gif 424w, https://substackcdn.com/image/fetch/$s_!h1NE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1acbea38-a580-48bd-bca4-60bf4e24472a_320x240.gif 848w, https://substackcdn.com/image/fetch/$s_!h1NE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1acbea38-a580-48bd-bca4-60bf4e24472a_320x240.gif 1272w, https://substackcdn.com/image/fetch/$s_!h1NE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1acbea38-a580-48bd-bca4-60bf4e24472a_320x240.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>CV-driven development is the deadly enemy of simplicity. Engineers love to make things complicated, and often the loudest, most disagreeable voice can win out. </p><p>Motivations might be pure (in a capitalistic sense): complexity is usually accepted to solve a real business problem. Maybe the builds are too slow. We might be getting too many frame drops. Perhaps your team isn&#8217;t always following the process. </p><p>But consider the full picture. Yes, we may solve frame drops on this screen with a shiny new UI framework. But we also permanently slow down feature development by 50%, and invent a huge class of &#8220;rebuild&#8221; work that no user asked us for.</p><p>Today we covered the seven deadly sins of cargo culting:</p><ul><li><p><strong>&#128081; Pride: </strong>Knowing better than Apple about UI frameworks</p></li><li><p><strong>&#129297; Greed</strong>: Everything must be available offline</p></li><li><p><strong>&#129512; Wrath: </strong>My architecture is bigger than yours</p></li><li><p><strong>&#9881;&#65039; Envy: </strong>We must adopt Google&#8217;s build system</p></li><li><p><strong>&#127814; Lust: </strong>Let&#8217;s make our networking stack polyamorous</p></li><li><p><strong>&#129316; Gluttony: </strong>Om-nom-nom all the modules</p></li><li><p><strong>&#9939;&#65039; Sloth:</strong> Automate all the things!</p></li></ul><p>Which are you most guilty of? </p><div><hr></div><h5><strong>Sponsored Link</strong></h5><h4><strong><a href="https://www.revenuecat.com/state-of-subscription-apps/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=sosa-2026">How iOS apps actually make money</a></strong></h4><blockquote><p>RevenueCat&#8217;s <a href="https://www.revenuecat.com/state-of-subscription-apps/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=sosa-2026">State of Subscription Apps</a> report is out, analyzing 115,000+ subscription apps and more than $16B in revenue. Use it to benchmark your pricing, trials, and conversion rates against what&#8217;s actually working across the app economy.</p></blockquote><div><hr></div><div class="callout-block" data-callout="true"><p><em>If you like this article, subscribe free to join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week.</em></p><div><hr></div><p><em>Paid members get a lot more:</em></p><p><em>&#127775; Access <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, my exclusive advanced content <br>&#128640; Read <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> a month before anyone else <br>&#129525; Master concurrency with my <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course">full course</a> and <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced training</a><br>&#129489;&#8205;&#128640; Get a free copy of my new eBook, &#8220;<a href="https://payhip.com/b/tvoug">Land your iOS Tech Job</a>&#8221;<br>&#10084;&#65039;&#8205;&#129657; Support independent, sometimes funny, tech writing</em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><blockquote><p><em>As a final word; here&#8217;s two very good blogs on this topic that formulated my core opinions in this post:</em></p><p><em><a href="https://boringtechnology.club">Choose Boring Technology</a><br><a href="https://grugbrain.dev">The Grug-Brained Developer</a></em></p></blockquote>]]></content:encoded></item><item><title><![CDATA[Survive the AI tech hiring winter ⛄️]]></title><description><![CDATA[A comprehensive new eBook to get you through the grind &#128218;]]></description><link>https://blog.jacobstechtavern.com/p/survive-the-ai-tech-hiring-winter</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/survive-the-ai-tech-hiring-winter</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Mon, 06 Apr 2026 15:03:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!gTM3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac7954fc-a8c0-44f9-a96d-3dd3a1f447ba_2886x1450.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Late last year I went independent. My wife gave me 100 days to get to sustainability.</p><p>My numbers were going up and to the right, and I was on top of the world.</p><p>But then, in late December 2025, I got a job.</p><p>I never told you why. Really.</p><p>My first motivation was financial: I crunched some numbers on a spreadsheet, and I&#8217;d struggle to break even before going bankrupt. I know how it goes. </p><p>But that&#8217;s just short-term downside risk.</p><p>Long-term, <em>who the f&amp;ck knows what the job market is going to look like?</em></p><p>Best to hitch my wagon to a muscly horse. Or, in my case, <a href="https://www.granola.ai/blog/series-c">a unicorn</a> &#129412;</p><p>The way I see it, there&#8217;s two ways to safeguard your career future from the risk of AI disruption:</p><ul><li><p><strong>Play defence:</strong> Becoming way more knowledgeable than average.</p></li><li><p><strong>Play offence:</strong> Position yourself in a company that will survive.</p></li></ul><p>I&#8217;m here to help you with both of those things. </p><h4><strong>Introducing&#8230;</strong></h4><p><strong>Land your iOS Tech Job <br></strong>(Jacob&#8217;s survival guide for the modern interview grind)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gTM3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac7954fc-a8c0-44f9-a96d-3dd3a1f447ba_2886x1450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gTM3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac7954fc-a8c0-44f9-a96d-3dd3a1f447ba_2886x1450.png 424w, https://substackcdn.com/image/fetch/$s_!gTM3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac7954fc-a8c0-44f9-a96d-3dd3a1f447ba_2886x1450.png 848w, https://substackcdn.com/image/fetch/$s_!gTM3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac7954fc-a8c0-44f9-a96d-3dd3a1f447ba_2886x1450.png 1272w, https://substackcdn.com/image/fetch/$s_!gTM3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac7954fc-a8c0-44f9-a96d-3dd3a1f447ba_2886x1450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gTM3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac7954fc-a8c0-44f9-a96d-3dd3a1f447ba_2886x1450.png" width="1456" height="732" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ac7954fc-a8c0-44f9-a96d-3dd3a1f447ba_2886x1450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:732,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1041916,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/191961676?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac7954fc-a8c0-44f9-a96d-3dd3a1f447ba_2886x1450.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gTM3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac7954fc-a8c0-44f9-a96d-3dd3a1f447ba_2886x1450.png 424w, https://substackcdn.com/image/fetch/$s_!gTM3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac7954fc-a8c0-44f9-a96d-3dd3a1f447ba_2886x1450.png 848w, https://substackcdn.com/image/fetch/$s_!gTM3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac7954fc-a8c0-44f9-a96d-3dd3a1f447ba_2886x1450.png 1272w, https://substackcdn.com/image/fetch/$s_!gTM3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac7954fc-a8c0-44f9-a96d-3dd3a1f447ba_2886x1450.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This is a comprehensive 109-page guidebook helping you prep for each stage of the big tech hiring process: from technical screenings, to system design, and the mysterious &#8220;iOS coding&#8221; interview.</p><p>It&#8217;s informed by my 10 years of iOS experience, conversations with senior engineers at Meta and Snap, and my personal experience from my own grind: 30 technical interviews across big tech and hot startups in December 2025.</p><blockquote><p><em><strong>Because it&#8217;ll be a little awkward to expense this to your company, I&#8217;m pricing it at a special reduced price of $19.99 this month only.</strong> </em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://payhip.com/b/tvoug&quot;,&quot;text&quot;:&quot;Buy the book now ($19)&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://payhip.com/b/tvoug"><span>Buy the book now ($19)</span></a></p><p>If you&#8217;re an existing paid subscriber? <strong>You get it for free. </strong>Thanks for the support!</p><p>Contact me if you&#8217;re a student, unemployed, or a layoff victim, and I&#8217;ll sort you out with a discount.</p><p><em>Cheers for reading Jacob&#8217;s Tech Tavern! &#127866;</em></p>]]></content:encoded></item><item><title><![CDATA[Oh sh*t, I have an "iOS coding" interview and don't know what to practice]]></title><description><![CDATA[A handy survival guide: drill, baby, drill!]]></description><link>https://blog.jacobstechtavern.com/p/ios-coding-interview</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/ios-coding-interview</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Tue, 31 Mar 2026 15:00:44 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hYJG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7e8779-c643-4eb2-ad22-bb67bfcd1cb5_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hYJG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7e8779-c643-4eb2-ad22-bb67bfcd1cb5_1680x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hYJG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7e8779-c643-4eb2-ad22-bb67bfcd1cb5_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!hYJG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7e8779-c643-4eb2-ad22-bb67bfcd1cb5_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!hYJG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7e8779-c643-4eb2-ad22-bb67bfcd1cb5_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!hYJG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7e8779-c643-4eb2-ad22-bb67bfcd1cb5_1680x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hYJG!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7e8779-c643-4eb2-ad22-bb67bfcd1cb5_1680x1200.png" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4a7e8779-c643-4eb2-ad22-bb67bfcd1cb5_1680x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:4145335,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181215683?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7e8779-c643-4eb2-ad22-bb67bfcd1cb5_1680x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hYJG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7e8779-c643-4eb2-ad22-bb67bfcd1cb5_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!hYJG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7e8779-c643-4eb2-ad22-bb67bfcd1cb5_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!hYJG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7e8779-c643-4eb2-ad22-bb67bfcd1cb5_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!hYJG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a7e8779-c643-4eb2-ad22-bb67bfcd1cb5_1680x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Landing a job is never easy. </p><p>There are a lot of themes you&#8217;ll encounter across many interview loops: take-home projects, system design, iOS knowledge, and LeetCode puzzles. These are pretty universal, and straightforward to prepare for. </p><p>In <a href="https://blog.jacobstechtavern.com/p/interview-grind">my interview grind</a> over December, I worked through ~30 individual technical interviews. Along the way, I encountered several rounds simply labelled <em>&#8220;iOS coding round&#8221;</em> or <em>&#8220;app building exercise&#8221;</em> or <em>&#8220;programming in iOS&#8221;</em>. I&#8217;d email the internal recruiter, and get zero details. Flying blind.</p><p><strong>Companies are being deliberately vague</strong>: They want to see you handle an unknown problem using your raw skills.</p><p>But, as a candidate, accepting the unknown is a crappy way to prepare for an interview. <strong>There is a way to train yourself</strong> to handle any curveball an iOS interview might throw at you: Drills.</p><p>Drilling a wide variety of problems helps train your engineering muscle memory and load up your cranial CPU caches, honing your ability to tackle any problem thrown your way. With practice, you can demonstrate your skills in the best light.</p><p>Today, I&#8217;ll detail the 5 broad archetypes of <em>&#8220;iOS coding&#8221;</em> interviews you&#8217;ll encounter. I&#8217;ll be sharing real practice problems <em>(and solutions)</em> that I used to land a tech job last month.</p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181215683/screen-building">Screen building</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181215683/component-design">Component design</a> </p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181215683/leetcode-lite">LeetCode-&#8220;lite&#8221;</a> </p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181215683/fundamentals">Fundamentals</a> </p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181215683/api-design">API design</a> </p></li></ul><p>This post comes packed with a fully-fledged sample project with drills to help you practice each class of interview problem. </p><div><hr></div><blockquote><p><em>Today is the last day of the Spring Sale for my Swift Concurrency eBook bundle. <strong>Get 55% off</strong> my paid-only concurrency masterclasses and <strong>own them forever</strong>.</em> </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://payhip.com/b/oAd3R&quot;,&quot;text&quot;:&quot;Master Concurrency for $29&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://payhip.com/b/oAd3R"><span>Master Concurrency for $29</span></a></p></blockquote><div><hr></div><h2>Categories of &#8220;iOS Coding&#8221; exercise </h2><p>If you&#8217;ve been out of the job market a while, you might be unfamiliar with the format. </p><p>Some companies, the stars, give you a highly detailed PDF explaining what they&#8217;ll interview you about, and what you can expect.</p><p>The vast majority are pretty taciturn when telling you what to expect. </p><p>If you know, you know. The email invite will look something like this:</p><ul><li><p><em>&#8220;An interview focused on programming and debugging in iOS.&#8221;</em></p></li><li><p><em>&#8220;An interview involving an app building exercise&#8221;</em></p></li><li><p><em>&#8220;An interview focusing on your experience with the iOS ecosystem, including core programming, architecture, and problem-solving.&#8221;</em></p></li><li><p><em>&#8220;An interview testing understanding of algorithms, data structures, and clean code&#8221;</em></p></li><li><p><em>&#8220;An interview on software engineering &amp; API-oriented programming.&#8221;</em></p></li></ul><p>Deciphering these is more art than science. </p><p>Some are mercifully transparent: <em>perhaps, for an app-building exercise, I should practice building an app</em>. Others are painfully opaque: <em>I guess it&#8217;s an interview about programming?</em>  </p><p>Across the 30 technical rounds I completed, I can map the generic <em>&#8220;iOS-programming&#8221;</em> style rounds to a few core categories, which dramatically focuses the scope of what you can do to prepare:</p><h4>Screen building </h4><p>This is the most straightforward challenge: you will be asked to build a screen from scratch with UIKit or SwiftUI. Practicing these is almost trivial: time yourself building various designs within 30 minutes or so.</p><h4>Component design </h4><p>You&#8217;ll be asked to build some kind of reusable UI component, demonstrating you can code, think about requirements, and recognise edge cases. Drilling is straightforward: practice building these components from scratch. </p><h4>LeetCode-&#8220;lite&#8221; </h4><p>Many companies say they&#8217;ll test you on algorithms and data structures, but <em>insist </em>that &#8220;<em>it&#8217;s not LeetCode&#8221;</em>. What they mean is that it&#8217;s not a <em>specific</em> LeetCode problem. But the only way to practice for these kinds of exercises is, you guessed it, practicing LeetCode. </p><h4>Fundamentals </h4><p>This is a broad category of problem where you&#8217;re asked to demonstrate something like <em>concurrency</em> skills, <em>debugging</em> skills, or <em>testing</em> skills. This is where AI tooling really shines in creating practice questions, with a little guiding hand.</p><h4>API design </h4><p>API design is a pretty uncommon format. It&#8217;s closer to a system design exercise, except you&#8217;re expected to show some code. You&#8217;ll be asked to design protocols to effectively implement a feature or system.</p><div><hr></div><p>Modern tooling makes it easier than ever to drill problems.</p><p>Agentic CLI tools like Claude Code and Codex will trivially generate sample projects for you and enable you to work through dozens of problems to practice your fundamentals, or develop your skills with a framework such as GCD. </p><p>Alternatively, it is helpful to poke holes in your own code, highlighting flaws, sloppy code, or missed edge cases. </p><p>Drilling random challenges train you to tackle unknown problems and allows you to shine in the interview.</p><p>Now I&#8217;ll give a worked example of each category of problem, sharing the sample code so you can drill for yourself. When you&#8217;re ready, you&#8217;ll have the power to generate and grade your own drills. </p><blockquote><p><em>Upgrade to unlock this article, plus much more:</em></p><p><em>&#127775; Access <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, my exclusive advanced content <br>&#128640; Read <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> a month before anyone else <br>&#129525; Master concurrency with my <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course">full course</a> and <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced training</a></em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p>
      <p>
          <a href="https://blog.jacobstechtavern.com/p/ios-coding-interview">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[The SwiftUI Design System War: Composition vs Progressive Disclosure]]></title><description><![CDATA[My most controversial high-conviction opinion]]></description><link>https://blog.jacobstechtavern.com/p/the-design-system-war</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/the-design-system-war</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Tue, 17 Mar 2026 16:02:40 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!wQ0E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2500f9-590d-4b30-8899-0c864351e056_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wQ0E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2500f9-590d-4b30-8899-0c864351e056_1680x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wQ0E!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2500f9-590d-4b30-8899-0c864351e056_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!wQ0E!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2500f9-590d-4b30-8899-0c864351e056_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!wQ0E!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2500f9-590d-4b30-8899-0c864351e056_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!wQ0E!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2500f9-590d-4b30-8899-0c864351e056_1680x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wQ0E!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2500f9-590d-4b30-8899-0c864351e056_1680x1200.png" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5c2500f9-590d-4b30-8899-0c864351e056_1680x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:4401592,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180131484?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2500f9-590d-4b30-8899-0c864351e056_1680x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wQ0E!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2500f9-590d-4b30-8899-0c864351e056_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!wQ0E!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2500f9-590d-4b30-8899-0c864351e056_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!wQ0E!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2500f9-590d-4b30-8899-0c864351e056_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!wQ0E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2500f9-590d-4b30-8899-0c864351e056_1680x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I&#8217;m no stranger to taking some heat when publishing my work. I got crucified for <a href="https://blog.jacobstechtavern.com/p/apple-is-killing-swift">Apple is Killing Swift</a>, and annoyed a <em>lot</em> of people with <a href="https://blog.jacobstechtavern.com/p/the-year-swiftui-died">2025: The Year SwiftUI Died</a>.</p><p>My 3rd-most-controversial post might surprise you: <a href="https://blog.jacobstechtavern.com/p/enums-and-design-systems">Swift Enums &#129309; Design Systems</a>. It was a friendly little number where I talked about my favourite approach for building design systems in SwiftUI, with a progressive-disclosure-inspired approach to my view component initialisers.</p><p>This reads like pretty reasonable stuff, until the terminally-online permafrost of SwiftUI zealots read it and admonished me: <em>&#8220;This is not idiomatic! You should be using view composition!&#8221;</em></p><p>They&#8217;re not wrong. My approach is not idiomatic. It&#8217;s <em>pragmatic</em>.</p><p>But you should really decide for yourself. </p><p>So I&#8217;m going to take my opinions and put them in my pocket, and coldly present the two approaches you can apply while building a design system in a large-scale SwiftUI project. You should use the approach that works for you. </p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/design-systems">Design Systems</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/the-sample-project">The Sample Project</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/how-to-composition">How to Composition</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/custom-buttonstyle">Custom ButtonStyle</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/shared-components">Shared Components</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/composition-in-action">Composition in action</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/progressive-disclosure">Progressive Disclosure</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/the-initialiser">The Initialiser</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/progressive-disclosure-in-action">Progressive Disclosure in action</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/the-really-important-things-with-design-systems">The Really Important Things With Design Systems</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/keeping-the-design-system-simple">Keeping the design system simple</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/extensibility">Extensibility</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/documentation">Documentation</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/preview">#Preview</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/is-it-marginal">Is it marginal?</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/180131484/last-orders">Last Orders</a>   </p></li></ul><div><hr></div><blockquote><p><strong>This week, I&#8217;m offering my 2-eBook concurrency bundle for 55% off</strong></p><p><strong>&#128216; The Complete Swift Concurrency Toolkit</strong> explains every facet of Swift Concurrency from async/await to the latest Swift 6.2 actor isolation changes. </p><p><strong>&#128213; Advanced Swift Concurrency Training</strong> takes you through 12 increasingly complex real-world problems, allowing you to lock-in practical knowledge.</p><p>By the end, you&#8217;ll have a finely-honed concurrency killer-instinct.</p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://payhip.com/b/oAd3R&quot;,&quot;text&quot;:&quot;Get the Swift Concurrency Bundle for $29&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://payhip.com/b/oAd3R"><span>Get the Swift Concurrency Bundle for $29</span></a></p><div><hr></div><blockquote><p><em><strong>Claim your free month</strong> to unlock this article, and much more:</em></p><p><em>&#127775; Access <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, my exclusive advanced content <br>&#128640; Read <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> a month before anyone else <br>&#129525; Master concurrency with my <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course">full course</a> and <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced training</a></em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?coupon=34c0e967&amp;utm_content=180131484&quot;,&quot;text&quot;:&quot;Get 30 day free trial&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://blog.jacobstechtavern.com/subscribe?coupon=34c0e967&amp;utm_content=180131484"><span>Get 30 day free trial</span></a></p>
      <p>
          <a href="https://blog.jacobstechtavern.com/p/the-design-system-war">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Is SwiftUI finally as fast as UIKit in iOS 26?]]></title><description><![CDATA[A scientific performance comparison. The final word.]]></description><link>https://blog.jacobstechtavern.com/p/swiftui-vs-uikit</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/swiftui-vs-uikit</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Mon, 09 Mar 2026 16:01:18 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!1Jn9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec517517-fbc1-4640-a984-33b4b9a0ade4_1680x1200.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1Jn9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec517517-fbc1-4640-a984-33b4b9a0ade4_1680x1200.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1Jn9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec517517-fbc1-4640-a984-33b4b9a0ade4_1680x1200.gif 424w, https://substackcdn.com/image/fetch/$s_!1Jn9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec517517-fbc1-4640-a984-33b4b9a0ade4_1680x1200.gif 848w, https://substackcdn.com/image/fetch/$s_!1Jn9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec517517-fbc1-4640-a984-33b4b9a0ade4_1680x1200.gif 1272w, https://substackcdn.com/image/fetch/$s_!1Jn9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec517517-fbc1-4640-a984-33b4b9a0ade4_1680x1200.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1Jn9!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec517517-fbc1-4640-a984-33b4b9a0ade4_1680x1200.gif" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ec517517-fbc1-4640-a984-33b4b9a0ade4_1680x1200.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:4715352,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec517517-fbc1-4640-a984-33b4b9a0ade4_1680x1200.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1Jn9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec517517-fbc1-4640-a984-33b4b9a0ade4_1680x1200.gif 424w, https://substackcdn.com/image/fetch/$s_!1Jn9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec517517-fbc1-4640-a984-33b4b9a0ade4_1680x1200.gif 848w, https://substackcdn.com/image/fetch/$s_!1Jn9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec517517-fbc1-4640-a984-33b4b9a0ade4_1680x1200.gif 1272w, https://substackcdn.com/image/fetch/$s_!1Jn9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec517517-fbc1-4640-a984-33b4b9a0ade4_1680x1200.gif 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">If anybody was on the fence about having kids, my four-year-old daughter saw this and started dancing along with the baby GIF.</figcaption></figure></div><p>I love SwiftUI; I hate SwiftUI. </p><p>I love UIKit; I hate UIKit. </p><p>When you&#8217;re as suggestible as me, it&#8217;s easy to be swayed based on the last blog post you read.</p><p>SwiftUI has forever been on a long journey to parity with UIKit, and the question of &#8220;is SwiftUI production-ready&#8221; has had a clear answer for years: <em>Yes, but</em>.</p><p><em>Yes, but</em> you will need to drop down to UIKit for stuff like the <a href="https://x.com/jacobtechtavern/status/1916947571974525169">Camera</a>.</p><p><em>Yes, but</em> some functionality like UIScrollViewDelegate scroll velocity is missing. </p><p><em>Yes, but</em> performance on an infinitely-scrolling feed will never be as good.</p><p>Performance. </p><p>Specifically, scroll performance.</p><p>At one time or another, we&#8217;ve all sat under the thumb of an imperious product manager or QA tester, demanding the single frame drop on their nan&#8217;s iPhone 4s be eliminated before you can go home.</p><p>But they do have a point:</p><p><strong>Performance is the final bastion of native iOS supremacy.</strong></p><p>You don&#8217;t want to hear it, but if we get comfortable shipping apps with noticeably mediocre performance on scroll-heavy screens, we might as well ship with React Native.</p><p>iOS 26 crosses the rubicon: in <a href="https://developer.apple.com/videos/play/wwdc2025/256/">WWDC 2025&#8217;s What&#8217;s New In SwiftUI</a>, Apple spent half the runtime explaining the improvements they made to List updates and scroll performance more widely.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZtDP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5fa9818-cbe9-46e2-9100-d46804d59527_2458x704.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZtDP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5fa9818-cbe9-46e2-9100-d46804d59527_2458x704.png 424w, https://substackcdn.com/image/fetch/$s_!ZtDP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5fa9818-cbe9-46e2-9100-d46804d59527_2458x704.png 848w, https://substackcdn.com/image/fetch/$s_!ZtDP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5fa9818-cbe9-46e2-9100-d46804d59527_2458x704.png 1272w, https://substackcdn.com/image/fetch/$s_!ZtDP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5fa9818-cbe9-46e2-9100-d46804d59527_2458x704.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZtDP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5fa9818-cbe9-46e2-9100-d46804d59527_2458x704.png" width="1456" height="417" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b5fa9818-cbe9-46e2-9100-d46804d59527_2458x704.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:417,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:359951,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5fa9818-cbe9-46e2-9100-d46804d59527_2458x704.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZtDP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5fa9818-cbe9-46e2-9100-d46804d59527_2458x704.png 424w, https://substackcdn.com/image/fetch/$s_!ZtDP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5fa9818-cbe9-46e2-9100-d46804d59527_2458x704.png 848w, https://substackcdn.com/image/fetch/$s_!ZtDP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5fa9818-cbe9-46e2-9100-d46804d59527_2458x704.png 1272w, https://substackcdn.com/image/fetch/$s_!ZtDP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5fa9818-cbe9-46e2-9100-d46804d59527_2458x704.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><blockquote><h5><strong>Sponsored Link</strong></h5><h4><strong><a href="https://www.revenuecat.com/state-of-subscription-apps/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=sosa-2026">How iOS apps actually make money</a></strong></h4><p>RevenueCat&#8217;s <a href="https://www.revenuecat.com/state-of-subscription-apps/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=sosa-2026">State of Subscription Apps</a> report is out, analyzing 115,000+ subscription apps and more than $16B in revenue. Use it to benchmark your pricing, trials, and conversion rates against what&#8217;s actually working across the app economy.</p></blockquote><p>These improvements aren&#8217;t theoretical: <a href="https://x.com/Dimillian">Thomas Ricouard&#8217;s</a> <a href="https://apps.apple.com/gb/app/ice-cubes-for-mastodon/id6444915884 Ice Cubes for Mastodon">Ice Cubes</a> app saw a substantial not-to-sniff-at drop in the scroll hitch rate since building against the iOS 26 SDK in version 2.0.0.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WBYn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa164c63c-418b-4bb4-b101-17683e4da41f_3248x1978.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WBYn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa164c63c-418b-4bb4-b101-17683e4da41f_3248x1978.jpeg 424w, https://substackcdn.com/image/fetch/$s_!WBYn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa164c63c-418b-4bb4-b101-17683e4da41f_3248x1978.jpeg 848w, https://substackcdn.com/image/fetch/$s_!WBYn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa164c63c-418b-4bb4-b101-17683e4da41f_3248x1978.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!WBYn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa164c63c-418b-4bb4-b101-17683e4da41f_3248x1978.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WBYn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa164c63c-418b-4bb4-b101-17683e4da41f_3248x1978.jpeg" width="1456" height="887" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a164c63c-418b-4bb4-b101-17683e4da41f_3248x1978.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:887,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:247926,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa164c63c-418b-4bb4-b101-17683e4da41f_3248x1978.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!WBYn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa164c63c-418b-4bb4-b101-17683e4da41f_3248x1978.jpeg 424w, https://substackcdn.com/image/fetch/$s_!WBYn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa164c63c-418b-4bb4-b101-17683e4da41f_3248x1978.jpeg 848w, https://substackcdn.com/image/fetch/$s_!WBYn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa164c63c-418b-4bb4-b101-17683e4da41f_3248x1978.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!WBYn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa164c63c-418b-4bb4-b101-17683e4da41f_3248x1978.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><em>Or, perhaps, all the most tight-fisted Mastodon users stubbornly holding onto their iPhone 4s suddenly upgraded en masse</em></figcaption></figure></div><p>Let&#8217;s put Apple&#8217;s claims to the test in the ultimate head-to-head battle of the scrolls.</p><p><strong>SwiftUI vs UIKit</strong>. </p><p>We&#8217;ll find out, once and for all, whether SwiftUI has hit parity on performance.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><ul><li><p><a href="https://blog.jacobstechtavern.com/i/184657452/designing-the-most-ridiculous-feed-i-can-imagine">Designing the most ridiculous scroll view I can imagine</a> </p></li><li><p><a href="https://blog.jacobstechtavern.com/i/184657452/a-fair-test">A fair test</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/184657452/swiftui-performance-feat-list">SwiftUI performance (feat. List)</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/184657452/animation-performance-with-instruments">Animation performance with Instruments</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/184657452/memory-cpu-and-thermal-profile-with-xcode">Memory, CPU, and thermal profile with Xcode</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/184657452/the-swiftui-performance-instrument">The SwiftUI Performance instrument</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/184657452/uikit-performance-feat-uicollectionview">UIKit performance (feat. UICollectionView)</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/184657452/animation-performance-with-instruments">Animation performance with Instruments</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/184657452/memory-cpu-and-thermal-profile-with-xcode">Memory, CPU, and thermal profile with Xcode</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/184657452/the-elephant-in-the-room">The Elephant in the Room</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/184657452/what-the-future-looks-like-for-swiftui">What the future looks like for SwiftUI</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/184657452/last-orders">Last Orders</a></p></li></ul><div><hr></div><h2>Designing the most ridiculous scroll view I can imagine </h2><p>If we want to meaningfully understand the performance characteristics of SwiftUI and UIKit scroll performance, we need to really put them to the test.</p><p>If you&#8217;re just rendering a simple storefront with a carousel of images, maybe with some text on each cell, then this isn&#8217;t the article for you. Both frameworks are probably fine.</p><p>But today I&#8217;m making the most complex scrolling feed I can imagine in SwiftUI.</p><p>What requirements are needed to make a UI truly ridiculous?</p><ul><li><p>High resolution images.</p></li><li><p>A complex view hierarchy of elements, text, and gradients.</p></li><li><p>Permanent autoplaying animations.</p></li><li><p>Variable-sized cells to force layout re-computation on cell reuse.</p></li><li><p>Multi-gesture UI interaction that update a data store in real-time.</p></li></ul><p>But how can we achieve this? </p><p><em>I have an idea. </em>With a little help from my friend, 2001&#8217;s 22,000 Animated Gifs CD-ROM.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QEf9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac34f089-3159-4a9f-91a8-af337a7e35bf_1672x1468.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QEf9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac34f089-3159-4a9f-91a8-af337a7e35bf_1672x1468.png 424w, https://substackcdn.com/image/fetch/$s_!QEf9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac34f089-3159-4a9f-91a8-af337a7e35bf_1672x1468.png 848w, https://substackcdn.com/image/fetch/$s_!QEf9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac34f089-3159-4a9f-91a8-af337a7e35bf_1672x1468.png 1272w, https://substackcdn.com/image/fetch/$s_!QEf9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac34f089-3159-4a9f-91a8-af337a7e35bf_1672x1468.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QEf9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac34f089-3159-4a9f-91a8-af337a7e35bf_1672x1468.png" width="1456" height="1278" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ac34f089-3159-4a9f-91a8-af337a7e35bf_1672x1468.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1278,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3790065,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac34f089-3159-4a9f-91a8-af337a7e35bf_1672x1468.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QEf9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac34f089-3159-4a9f-91a8-af337a7e35bf_1672x1468.png 424w, https://substackcdn.com/image/fetch/$s_!QEf9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac34f089-3159-4a9f-91a8-af337a7e35bf_1672x1468.png 848w, https://substackcdn.com/image/fetch/$s_!QEf9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac34f089-3159-4a9f-91a8-af337a7e35bf_1672x1468.png 1272w, https://substackcdn.com/image/fetch/$s_!QEf9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac34f089-3159-4a9f-91a8-af337a7e35bf_1672x1468.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://archive.org/details/22000Animatedgifs">Hell. Freakin&#8217;. Yeah.</a></figcaption></figure></div><blockquote><p><em>Uh, so this disc image is from 2001. I need to mount the .iso somehow&#8230; macOS won&#8217;t play along. You know what, this is below my pay grade. I&#8217;m gonna get Claude to dump it out and export me a folder of .gifs.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ApY4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9df3303-d4bd-4b00-8874-1c73b3d4fc82_533x400.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ApY4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9df3303-d4bd-4b00-8874-1c73b3d4fc82_533x400.webp 424w, https://substackcdn.com/image/fetch/$s_!ApY4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9df3303-d4bd-4b00-8874-1c73b3d4fc82_533x400.webp 848w, https://substackcdn.com/image/fetch/$s_!ApY4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9df3303-d4bd-4b00-8874-1c73b3d4fc82_533x400.webp 1272w, https://substackcdn.com/image/fetch/$s_!ApY4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9df3303-d4bd-4b00-8874-1c73b3d4fc82_533x400.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ApY4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9df3303-d4bd-4b00-8874-1c73b3d4fc82_533x400.webp" width="533" height="400" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d9df3303-d4bd-4b00-8874-1c73b3d4fc82_533x400.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:400,&quot;width&quot;:533,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1042946,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9df3303-d4bd-4b00-8874-1c73b3d4fc82_533x400.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ApY4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9df3303-d4bd-4b00-8874-1c73b3d4fc82_533x400.webp 424w, https://substackcdn.com/image/fetch/$s_!ApY4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9df3303-d4bd-4b00-8874-1c73b3d4fc82_533x400.webp 848w, https://substackcdn.com/image/fetch/$s_!ApY4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9df3303-d4bd-4b00-8874-1c73b3d4fc82_533x400.webp 1272w, https://substackcdn.com/image/fetch/$s_!ApY4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9df3303-d4bd-4b00-8874-1c73b3d4fc82_533x400.webp 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Throwback to the early 90s when <a href="https://techcrunch.com/2014/06/15/a-brief-history-of-the-dancing-baby-meme/">dancing baby</a> was literally the funniest meme ever</em>.</p></blockquote><p>Now we have our secret sauce, I can build out twin chaotic UIs in both SwiftUI and UIKit. </p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;9d929566-24ab-4dd4-99a9-50dbc766500a&quot;,&quot;duration&quot;:null}"></div><p>These <strong>gifs</strong> are bananas. And yes, I <em>do</em> pronounce it just like you.</p><p>The complexity of this UI forces the screen to aim for the high-performance 120fps refresh rate, giving just 8.33ms to render each frame. There is no hiding from this in my performance profiles.</p><p>So. </p><p>Once and for all.</p><p>Is SwiftUI finally as performant as UIKit?</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>A fair test </h2><p>I&#8217;m a scientist. </p><p>Well. Kind of. I did a physics degree.</p><p>Did I drop out of my masters into the 3-year bachelor course? Yes. But only because I&#8217;m smart enough to know that I&#8217;m not smart enough to do a masters.</p><p>I digress. </p><p>To ensure a fair test, we want to control the extraneous variables. <em>(Or is it confounding variables? I digress. Again).</em> </p><p>Anyway. I&#8217;m running everything on my iPhone 17, with iOS 26.1. You can complete the exact same tests yourself to corroborate (or deny!) my results, using the open-source project:</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://github.com/jacobsapps/SwiftUI-vs-UIKit&quot;,&quot;text&quot;:&quot;Download the project&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://github.com/jacobsapps/SwiftUI-vs-UIKit"><span>Download the project</span></a></p><blockquote><p><em>Honestly, this is worth doing purely to see the menagerie of retro gifs.</em></p></blockquote><p>To go further with controlling variables, I shared as much code as practicable. About half of the code was factored into a shared public module, including the <strong>@Observable</strong> view model used by both the UIKit and SwiftUI feeds.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GCg9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c04fa94-e565-4c6b-8a4a-0df8d5e149f6_2378x1308.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GCg9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c04fa94-e565-4c6b-8a4a-0df8d5e149f6_2378x1308.png 424w, https://substackcdn.com/image/fetch/$s_!GCg9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c04fa94-e565-4c6b-8a4a-0df8d5e149f6_2378x1308.png 848w, https://substackcdn.com/image/fetch/$s_!GCg9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c04fa94-e565-4c6b-8a4a-0df8d5e149f6_2378x1308.png 1272w, https://substackcdn.com/image/fetch/$s_!GCg9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c04fa94-e565-4c6b-8a4a-0df8d5e149f6_2378x1308.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GCg9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c04fa94-e565-4c6b-8a4a-0df8d5e149f6_2378x1308.png" width="1456" height="801" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1c04fa94-e565-4c6b-8a4a-0df8d5e149f6_2378x1308.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:801,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:605496,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c04fa94-e565-4c6b-8a4a-0df8d5e149f6_2378x1308.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GCg9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c04fa94-e565-4c6b-8a4a-0df8d5e149f6_2378x1308.png 424w, https://substackcdn.com/image/fetch/$s_!GCg9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c04fa94-e565-4c6b-8a4a-0df8d5e149f6_2378x1308.png 848w, https://substackcdn.com/image/fetch/$s_!GCg9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c04fa94-e565-4c6b-8a4a-0df8d5e149f6_2378x1308.png 1272w, https://substackcdn.com/image/fetch/$s_!GCg9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c04fa94-e565-4c6b-8a4a-0df8d5e149f6_2378x1308.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I also used a third-party library, <a href="https://github.com/alexiscreuzot/SwiftyGif">SwiftyGif</a>, to handle gif animations. I wasn&#8217;t enormously happy to wrap the gif in a UIViewRepresentable to expose it to SwiftUI, but the small overhead incurred here was massively preferable to using an entirely different library. Known error bars and all that.</p><p>I applied a few basic performance tricks to ensure we&#8217;re putting our game face on with both UI frameworks: </p><ul><li><p>We&#8217;re caching images via NSCache (with a reasonable ~300MB limit to avoid eating all our memory). </p></li><li><p>We&#8217;re paginating our data (even though it&#8217;s all local) to avoid overburdening our view model on load. </p></li><li><p>I compressed the larger background images to avoid unnecessarily heavy decoding.</p></li><li><p>I am using the @Observable macro for the shared view model to ensure data flow behaviour is identical. </p></li><li><p>When moving our gif stickers around via gestures, we only write changes to the model state when the gesture ends (via <strong>updateSticker</strong>), rather than per tick.</p></li></ul><p>Now let&#8217;s run the experiment. </p><div><hr></div><h2>SwiftUI performance (feat. List)</h2><p>Last year I wrote a popular piece profiling the various approaches for building a scrolling feed on SwiftUI. After testing out VStack, LazyVStack, and List, I confirmed that List was the undisputed king when it comes to SwiftUI scroll performance.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;1645cfbd-6acf-430d-b19b-2b6e4c10ba43&quot;,&quot;caption&quot;:&quot;SwiftUI is like magic.&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;SwiftUI Scroll Performance: The 120FPS Challenge&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:126930235,&quot;name&quot;:&quot;Jacob Bartlett&quot;,&quot;bio&quot;:&quot;Master iOS. Boost your salary. Join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week. Sign up free today!&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!s80e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feab1e065-dffc-4096-ad9e-826ddda8a6cd_1304x1304.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100}],&quot;post_date&quot;:&quot;2025-05-05T15:00:38.653Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!yKru!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fd8d9ac-8e83-4402-9560-e04977e79472_1680x1200.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.jacobstechtavern.com/p/swiftui-scroll-performance-the-120fps&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:157793004,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:55,&quot;comment_count&quot;:5,&quot;publication_id&quot;:1376173,&quot;publication_name&quot;:&quot;Jacob&#8217;s Tech Tavern&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LJp-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee402e25-4e20-4683-ba5f-20ca86eb2b43_512x512.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p>We built out this List here to design our feed UI.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GtsU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c9a0f92-a644-4d2b-9c41-0468e5e9bf1e_2256x2076.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GtsU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c9a0f92-a644-4d2b-9c41-0468e5e9bf1e_2256x2076.png 424w, https://substackcdn.com/image/fetch/$s_!GtsU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c9a0f92-a644-4d2b-9c41-0468e5e9bf1e_2256x2076.png 848w, https://substackcdn.com/image/fetch/$s_!GtsU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c9a0f92-a644-4d2b-9c41-0468e5e9bf1e_2256x2076.png 1272w, https://substackcdn.com/image/fetch/$s_!GtsU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c9a0f92-a644-4d2b-9c41-0468e5e9bf1e_2256x2076.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GtsU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c9a0f92-a644-4d2b-9c41-0468e5e9bf1e_2256x2076.png" width="1456" height="1340" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2c9a0f92-a644-4d2b-9c41-0468e5e9bf1e_2256x2076.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1340,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:474902,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c9a0f92-a644-4d2b-9c41-0468e5e9bf1e_2256x2076.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GtsU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c9a0f92-a644-4d2b-9c41-0468e5e9bf1e_2256x2076.png 424w, https://substackcdn.com/image/fetch/$s_!GtsU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c9a0f92-a644-4d2b-9c41-0468e5e9bf1e_2256x2076.png 848w, https://substackcdn.com/image/fetch/$s_!GtsU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c9a0f92-a644-4d2b-9c41-0468e5e9bf1e_2256x2076.png 1272w, https://substackcdn.com/image/fetch/$s_!GtsU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c9a0f92-a644-4d2b-9c41-0468e5e9bf1e_2256x2076.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://gist.github.com/jacobsapps/fd505840658a9edd05b96d71a9fe1e08">Gist</a></figcaption></figure></div><p>Now let&#8217;s begin profiling. </p><h4>Animation performance with Instruments</h4><p>We find Instruments from the Xcode &gt; Open Developer Tool menu. To profile animation performance, the Animation Hitches instrument is pre-packaged with profiles for Hitches, Hangs, Display Sync, and Time Profile.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AnoS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f4901f-b611-4508-b2b9-82d7c1d991ba_1964x1162.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AnoS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f4901f-b611-4508-b2b9-82d7c1d991ba_1964x1162.png 424w, https://substackcdn.com/image/fetch/$s_!AnoS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f4901f-b611-4508-b2b9-82d7c1d991ba_1964x1162.png 848w, https://substackcdn.com/image/fetch/$s_!AnoS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f4901f-b611-4508-b2b9-82d7c1d991ba_1964x1162.png 1272w, https://substackcdn.com/image/fetch/$s_!AnoS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f4901f-b611-4508-b2b9-82d7c1d991ba_1964x1162.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AnoS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f4901f-b611-4508-b2b9-82d7c1d991ba_1964x1162.png" width="1456" height="861" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a7f4901f-b611-4508-b2b9-82d7c1d991ba_1964x1162.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:861,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1085151,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f4901f-b611-4508-b2b9-82d7c1d991ba_1964x1162.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!AnoS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f4901f-b611-4508-b2b9-82d7c1d991ba_1964x1162.png 424w, https://substackcdn.com/image/fetch/$s_!AnoS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f4901f-b611-4508-b2b9-82d7c1d991ba_1964x1162.png 848w, https://substackcdn.com/image/fetch/$s_!AnoS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f4901f-b611-4508-b2b9-82d7c1d991ba_1964x1162.png 1272w, https://substackcdn.com/image/fetch/$s_!AnoS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f4901f-b611-4508-b2b9-82d7c1d991ba_1964x1162.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I ran the same test a few times:</p><ul><li><p>Loaded the app up. </p></li><li><p>Scrolled slowly.</p></li><li><p>Began scrolling more quickly.</p></li><li><p>Scrolling very rapidly, up and down. </p></li><li><p>After 10ish seconds of this, I moved and resized some gifs with gestures.</p></li></ul><p>I have crappy perception, so didn&#8217;t rate my ability to <em>feel</em> minor animation issues. But during my first run, I felt two very noticeable hangs, where the UI was briefly unresponsive betwixt tap and scroll.</p><p>But this wasn&#8217;t the half of it. Once I looked at my proper instruments trace, I felt like the detective barging into a Jack The Ripper&#8217;s crime scene.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-xiJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cf9b5e-e77b-4c26-ad60-3e7ab3fdf618_2544x926.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-xiJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cf9b5e-e77b-4c26-ad60-3e7ab3fdf618_2544x926.png 424w, https://substackcdn.com/image/fetch/$s_!-xiJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cf9b5e-e77b-4c26-ad60-3e7ab3fdf618_2544x926.png 848w, https://substackcdn.com/image/fetch/$s_!-xiJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cf9b5e-e77b-4c26-ad60-3e7ab3fdf618_2544x926.png 1272w, https://substackcdn.com/image/fetch/$s_!-xiJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cf9b5e-e77b-4c26-ad60-3e7ab3fdf618_2544x926.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-xiJ!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cf9b5e-e77b-4c26-ad60-3e7ab3fdf618_2544x926.png" width="1200" height="436.8131868131868" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/81cf9b5e-e77b-4c26-ad60-3e7ab3fdf618_2544x926.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:530,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:669703,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cf9b5e-e77b-4c26-ad60-3e7ab3fdf618_2544x926.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-xiJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cf9b5e-e77b-4c26-ad60-3e7ab3fdf618_2544x926.png 424w, https://substackcdn.com/image/fetch/$s_!-xiJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cf9b5e-e77b-4c26-ad60-3e7ab3fdf618_2544x926.png 848w, https://substackcdn.com/image/fetch/$s_!-xiJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cf9b5e-e77b-4c26-ad60-3e7ab3fdf618_2544x926.png 1272w, https://substackcdn.com/image/fetch/$s_!-xiJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cf9b5e-e77b-4c26-ad60-3e7ab3fdf618_2544x926.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p>78 hitches (frame drops) in 24 seconds of running.</p></li><li><p>2 severe hangs (unresponsive UI) of ~2 seconds each. </p></li></ul><p>This was consistent across multiple runs. Average hitch duration was just over 24ms, meaning ~3 dropped frames per hitch. The UI threw up 3.4 hitches per second. Given that I struggled to perceive this, I should think about going to Specsavers.  </p><p>You can see clusters of red lines on the Hitches trace, representing more frame drops where I was scrolling more rapidly.</p><h4>Memory, CPU, and thermal profile with Xcode</h4><p>So scroll performance wasn&#8217;t great. Let&#8217;s look at some other important performance metrics, this time directly in the Xcode debugger. </p><p>Memory usage wasn&#8217;t dramatic, but <em>was</em> interestingly spiky. Perhaps due to the different numbers of gifs and different resolution of the images rendered on each cell. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TAQy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e2506d-ef7b-4231-bd58-12039da46020_2476x1160.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TAQy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e2506d-ef7b-4231-bd58-12039da46020_2476x1160.png 424w, https://substackcdn.com/image/fetch/$s_!TAQy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e2506d-ef7b-4231-bd58-12039da46020_2476x1160.png 848w, https://substackcdn.com/image/fetch/$s_!TAQy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e2506d-ef7b-4231-bd58-12039da46020_2476x1160.png 1272w, https://substackcdn.com/image/fetch/$s_!TAQy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e2506d-ef7b-4231-bd58-12039da46020_2476x1160.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TAQy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e2506d-ef7b-4231-bd58-12039da46020_2476x1160.png" width="1456" height="682" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f4e2506d-ef7b-4231-bd58-12039da46020_2476x1160.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:682,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:477361,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e2506d-ef7b-4231-bd58-12039da46020_2476x1160.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TAQy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e2506d-ef7b-4231-bd58-12039da46020_2476x1160.png 424w, https://substackcdn.com/image/fetch/$s_!TAQy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e2506d-ef7b-4231-bd58-12039da46020_2476x1160.png 848w, https://substackcdn.com/image/fetch/$s_!TAQy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e2506d-ef7b-4231-bd58-12039da46020_2476x1160.png 1272w, https://substackcdn.com/image/fetch/$s_!TAQy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e2506d-ef7b-4231-bd58-12039da46020_2476x1160.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>CPU and thermal performance was a whole &#8216;nother story: it&#8217;s clear now why we had so many hitches. Even at rest, no scrolling, the CPU screamed at 100% capacity to render every gif, and well past 100% (distributing work across CPU cores) when I scrolled.</p><p>The &#8220;Very High&#8221; energy impact rapidly heated my device. The measured thermal trace crept up towards <em>Serious</em>. When I wasn&#8217;t paying attention, the app was even killed by the OS, presumably hitting a critical thermal spike.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wK-m!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc43ef5d-4592-4154-a9cc-00649174c072_2998x1248.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wK-m!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc43ef5d-4592-4154-a9cc-00649174c072_2998x1248.png 424w, https://substackcdn.com/image/fetch/$s_!wK-m!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc43ef5d-4592-4154-a9cc-00649174c072_2998x1248.png 848w, https://substackcdn.com/image/fetch/$s_!wK-m!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc43ef5d-4592-4154-a9cc-00649174c072_2998x1248.png 1272w, https://substackcdn.com/image/fetch/$s_!wK-m!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc43ef5d-4592-4154-a9cc-00649174c072_2998x1248.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wK-m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc43ef5d-4592-4154-a9cc-00649174c072_2998x1248.png" width="1456" height="606" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc43ef5d-4592-4154-a9cc-00649174c072_2998x1248.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:606,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:419065,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc43ef5d-4592-4154-a9cc-00649174c072_2998x1248.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wK-m!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc43ef5d-4592-4154-a9cc-00649174c072_2998x1248.png 424w, https://substackcdn.com/image/fetch/$s_!wK-m!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc43ef5d-4592-4154-a9cc-00649174c072_2998x1248.png 848w, https://substackcdn.com/image/fetch/$s_!wK-m!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc43ef5d-4592-4154-a9cc-00649174c072_2998x1248.png 1272w, https://substackcdn.com/image/fetch/$s_!wK-m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc43ef5d-4592-4154-a9cc-00649174c072_2998x1248.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>The SwiftUI Performance instrument</h4><p>Okay, so that wasn&#8217;t ideal. But, hey, look, new instrument!</p><p>Okay. This isn&#8217;t really relevant to this test, but it is nice. For Xcode 26, Apple created a brand-new tool for debugging slow View computation updates in SwiftUI.</p><p>As you can see here, highlighted view update issues neatly coincide with UI hitches. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U3I9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5c742a-d870-436c-ae1a-5d9318ddbcf4_2540x1214.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U3I9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5c742a-d870-436c-ae1a-5d9318ddbcf4_2540x1214.png 424w, https://substackcdn.com/image/fetch/$s_!U3I9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5c742a-d870-436c-ae1a-5d9318ddbcf4_2540x1214.png 848w, https://substackcdn.com/image/fetch/$s_!U3I9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5c742a-d870-436c-ae1a-5d9318ddbcf4_2540x1214.png 1272w, https://substackcdn.com/image/fetch/$s_!U3I9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5c742a-d870-436c-ae1a-5d9318ddbcf4_2540x1214.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U3I9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5c742a-d870-436c-ae1a-5d9318ddbcf4_2540x1214.png" width="1456" height="696" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc5c742a-d870-436c-ae1a-5d9318ddbcf4_2540x1214.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:696,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:699507,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5c742a-d870-436c-ae1a-5d9318ddbcf4_2540x1214.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!U3I9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5c742a-d870-436c-ae1a-5d9318ddbcf4_2540x1214.png 424w, https://substackcdn.com/image/fetch/$s_!U3I9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5c742a-d870-436c-ae1a-5d9318ddbcf4_2540x1214.png 848w, https://substackcdn.com/image/fetch/$s_!U3I9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5c742a-d870-436c-ae1a-5d9318ddbcf4_2540x1214.png 1272w, https://substackcdn.com/image/fetch/$s_!U3I9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5c742a-d870-436c-ae1a-5d9318ddbcf4_2540x1214.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In production, this is another wrench in your tool-belt you can use to tweak heavy SwiftUI bodies. It even includes a <a href="https://x.com/oskargroth/status/2004236738978631839">cause &amp; effect graph</a> so you can see exactly what state changes trigger re-renders.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>UIKit Performance (feat. UICollectionView)</h2><p>Okay, so our SwiftUI List didn&#8217;t work fantastically when faced with a paginated scrolling feed, containing high-res images, gradients, animations, gesture-based interactions, and a ton of gifs. </p><p>What is the state of the art for achieving this in UIKit? The <strong>UICollectionView</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BNoE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a54414a-2a00-4f02-8f84-9d8dd1b12f7b_2622x2252.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BNoE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a54414a-2a00-4f02-8f84-9d8dd1b12f7b_2622x2252.png 424w, https://substackcdn.com/image/fetch/$s_!BNoE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a54414a-2a00-4f02-8f84-9d8dd1b12f7b_2622x2252.png 848w, https://substackcdn.com/image/fetch/$s_!BNoE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a54414a-2a00-4f02-8f84-9d8dd1b12f7b_2622x2252.png 1272w, https://substackcdn.com/image/fetch/$s_!BNoE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a54414a-2a00-4f02-8f84-9d8dd1b12f7b_2622x2252.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BNoE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a54414a-2a00-4f02-8f84-9d8dd1b12f7b_2622x2252.png" width="1456" height="1251" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9a54414a-2a00-4f02-8f84-9d8dd1b12f7b_2622x2252.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1251,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:631733,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a54414a-2a00-4f02-8f84-9d8dd1b12f7b_2622x2252.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BNoE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a54414a-2a00-4f02-8f84-9d8dd1b12f7b_2622x2252.png 424w, https://substackcdn.com/image/fetch/$s_!BNoE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a54414a-2a00-4f02-8f84-9d8dd1b12f7b_2622x2252.png 848w, https://substackcdn.com/image/fetch/$s_!BNoE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a54414a-2a00-4f02-8f84-9d8dd1b12f7b_2622x2252.png 1272w, https://substackcdn.com/image/fetch/$s_!BNoE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a54414a-2a00-4f02-8f84-9d8dd1b12f7b_2622x2252.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://gist.github.com/jacobsapps/a5bf7904a9d535b23cbc0c35a7f1147e">Gist</a></figcaption></figure></div><p>Let&#8217;s jump straight into the profiles. </p><h4>Animation performance with Instruments</h4><p>I did the same set of tests, the same number of times. Load, scroll, scroll faster, and play with the gifs. </p><p>I freely admit I&#8217;m not enormously perceptive, but there was something there. The SwiftUI one, even before looking at the trace, and experiencing the UI freeze, felt unexplainedly&#8230; <em>off</em>. </p><p>UIKit version had no such problems. This is some Unreal Engine 5 sh*t. Just&#8230;  no part of my subconscious lizard brain was screaming while I scrolled. </p><p>When it comes to the actual Instruments trace, UIKit is almost showing off.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WdVM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffccd5d79-4514-41ec-ae49-ade4354430a4_2550x938.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WdVM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffccd5d79-4514-41ec-ae49-ade4354430a4_2550x938.png 424w, https://substackcdn.com/image/fetch/$s_!WdVM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffccd5d79-4514-41ec-ae49-ade4354430a4_2550x938.png 848w, https://substackcdn.com/image/fetch/$s_!WdVM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffccd5d79-4514-41ec-ae49-ade4354430a4_2550x938.png 1272w, https://substackcdn.com/image/fetch/$s_!WdVM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffccd5d79-4514-41ec-ae49-ade4354430a4_2550x938.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WdVM!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffccd5d79-4514-41ec-ae49-ade4354430a4_2550x938.png" width="1200" height="441.75824175824175" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fccd5d79-4514-41ec-ae49-ade4354430a4_2550x938.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:536,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:574312,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffccd5d79-4514-41ec-ae49-ade4354430a4_2550x938.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WdVM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffccd5d79-4514-41ec-ae49-ade4354430a4_2550x938.png 424w, https://substackcdn.com/image/fetch/$s_!WdVM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffccd5d79-4514-41ec-ae49-ade4354430a4_2550x938.png 848w, https://substackcdn.com/image/fetch/$s_!WdVM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffccd5d79-4514-41ec-ae49-ade4354430a4_2550x938.png 1272w, https://substackcdn.com/image/fetch/$s_!WdVM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffccd5d79-4514-41ec-ae49-ade4354430a4_2550x938.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Across my tests, I measured 0.7 hitches per second (compared to 3.4 for SwiftUI). </p><p>Average hitch duration was the same. No hangs were detected, but there were a couple of brief (38ms) interaction delays, highlighted in grey. </p><h4>Memory, CPU, and thermal profile with Xcode</h4><p>When it came to profiling peak memory and energy usage, I expected the same kind of results I saw in SwiftUI: We&#8217;re still displaying an enormous number of elements, animating them the same, and these images are not any bigger or smaller, right?</p><p>Now don&#8217;t I look silly.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4AXq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad8e4d47-ad26-4178-865d-98a400ba08f7_2832x1260.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4AXq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad8e4d47-ad26-4178-865d-98a400ba08f7_2832x1260.png 424w, https://substackcdn.com/image/fetch/$s_!4AXq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad8e4d47-ad26-4178-865d-98a400ba08f7_2832x1260.png 848w, https://substackcdn.com/image/fetch/$s_!4AXq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad8e4d47-ad26-4178-865d-98a400ba08f7_2832x1260.png 1272w, https://substackcdn.com/image/fetch/$s_!4AXq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad8e4d47-ad26-4178-865d-98a400ba08f7_2832x1260.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4AXq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad8e4d47-ad26-4178-865d-98a400ba08f7_2832x1260.png" width="1456" height="648" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ad8e4d47-ad26-4178-865d-98a400ba08f7_2832x1260.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:648,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:396261,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad8e4d47-ad26-4178-865d-98a400ba08f7_2832x1260.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4AXq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad8e4d47-ad26-4178-865d-98a400ba08f7_2832x1260.png 424w, https://substackcdn.com/image/fetch/$s_!4AXq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad8e4d47-ad26-4178-865d-98a400ba08f7_2832x1260.png 848w, https://substackcdn.com/image/fetch/$s_!4AXq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad8e4d47-ad26-4178-865d-98a400ba08f7_2832x1260.png 1272w, https://substackcdn.com/image/fetch/$s_!4AXq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad8e4d47-ad26-4178-865d-98a400ba08f7_2832x1260.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Memory usage hovered around 92MB for UIKit, compared to 248MB in SwiftUI.</p><p>After giving a serious beating to my shiny new <a href="https://en.wikipedia.org/wiki/Apple_A19">A19</a> chip, the same feed in UIKit produced comparatively nearly trivial CPU and energy usage. </p><ul><li><p>At rest, UIKit dropped as low as <strong>11%</strong> CPU utilisation, vs a consistent <strong>100%</strong> for the SwiftUI version </p></li><li><p>Energy usage correspondingly held at <strong>High</strong> for UIKit, vs <strong>Very High</strong> for SwiftUI.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3TOQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab4c9f4b-bddd-4c3b-87ef-80a729fd5fe6_2818x1318.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3TOQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab4c9f4b-bddd-4c3b-87ef-80a729fd5fe6_2818x1318.png 424w, https://substackcdn.com/image/fetch/$s_!3TOQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab4c9f4b-bddd-4c3b-87ef-80a729fd5fe6_2818x1318.png 848w, https://substackcdn.com/image/fetch/$s_!3TOQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab4c9f4b-bddd-4c3b-87ef-80a729fd5fe6_2818x1318.png 1272w, https://substackcdn.com/image/fetch/$s_!3TOQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab4c9f4b-bddd-4c3b-87ef-80a729fd5fe6_2818x1318.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3TOQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab4c9f4b-bddd-4c3b-87ef-80a729fd5fe6_2818x1318.png" width="1456" height="681" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ab4c9f4b-bddd-4c3b-87ef-80a729fd5fe6_2818x1318.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:681,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:359534,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab4c9f4b-bddd-4c3b-87ef-80a729fd5fe6_2818x1318.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3TOQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab4c9f4b-bddd-4c3b-87ef-80a729fd5fe6_2818x1318.png 424w, https://substackcdn.com/image/fetch/$s_!3TOQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab4c9f4b-bddd-4c3b-87ef-80a729fd5fe6_2818x1318.png 848w, https://substackcdn.com/image/fetch/$s_!3TOQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab4c9f4b-bddd-4c3b-87ef-80a729fd5fe6_2818x1318.png 1272w, https://substackcdn.com/image/fetch/$s_!3TOQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab4c9f4b-bddd-4c3b-87ef-80a729fd5fe6_2818x1318.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I gave up waiting for the thermal profile to hit Fair after 3 minutes.</p><div><hr></div><h2>The Elephant in the Room &#128024;</h2><p>Even in iOS 26, SwiftUI is dramatically outclassed by UIKit when it comes to scroll performance of very complex UIs.</p><p>But <strong>why</strong> is this performance different? </p><p>Perhaps you&#8217;re thinking what I&#8217;m thinking. </p><p><strong>Isn&#8217;t List <a href="https://fatbobman.com/en/posts/list-or-lazyvstack">implemented via UICollectionView</a> under the hood?</strong></p><p>Here&#8217;s our UIKit version, in the view hierarchy debugger, resplendent with our manually-crafted <strong>UICollectionView</strong>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Xg3u!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa310554-d04c-45ab-b8c2-4cb205e9028f_2090x1314.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xg3u!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa310554-d04c-45ab-b8c2-4cb205e9028f_2090x1314.png 424w, https://substackcdn.com/image/fetch/$s_!Xg3u!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa310554-d04c-45ab-b8c2-4cb205e9028f_2090x1314.png 848w, https://substackcdn.com/image/fetch/$s_!Xg3u!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa310554-d04c-45ab-b8c2-4cb205e9028f_2090x1314.png 1272w, https://substackcdn.com/image/fetch/$s_!Xg3u!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa310554-d04c-45ab-b8c2-4cb205e9028f_2090x1314.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xg3u!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa310554-d04c-45ab-b8c2-4cb205e9028f_2090x1314.png" width="1456" height="915" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aa310554-d04c-45ab-b8c2-4cb205e9028f_2090x1314.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:915,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1730046,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa310554-d04c-45ab-b8c2-4cb205e9028f_2090x1314.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Xg3u!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa310554-d04c-45ab-b8c2-4cb205e9028f_2090x1314.png 424w, https://substackcdn.com/image/fetch/$s_!Xg3u!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa310554-d04c-45ab-b8c2-4cb205e9028f_2090x1314.png 848w, https://substackcdn.com/image/fetch/$s_!Xg3u!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa310554-d04c-45ab-b8c2-4cb205e9028f_2090x1314.png 1272w, https://substackcdn.com/image/fetch/$s_!Xg3u!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa310554-d04c-45ab-b8c2-4cb205e9028f_2090x1314.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The SwiftUI screen contains a mysterious <strong>UpdateCoalescingCollectionView</strong>. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yguQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73bab6bf-931e-41ae-94bd-d42220ab5f72_1726x1336.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yguQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73bab6bf-931e-41ae-94bd-d42220ab5f72_1726x1336.png 424w, https://substackcdn.com/image/fetch/$s_!yguQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73bab6bf-931e-41ae-94bd-d42220ab5f72_1726x1336.png 848w, https://substackcdn.com/image/fetch/$s_!yguQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73bab6bf-931e-41ae-94bd-d42220ab5f72_1726x1336.png 1272w, https://substackcdn.com/image/fetch/$s_!yguQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73bab6bf-931e-41ae-94bd-d42220ab5f72_1726x1336.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yguQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73bab6bf-931e-41ae-94bd-d42220ab5f72_1726x1336.png" width="1456" height="1127" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/73bab6bf-931e-41ae-94bd-d42220ab5f72_1726x1336.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1127,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1876549,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73bab6bf-931e-41ae-94bd-d42220ab5f72_1726x1336.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yguQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73bab6bf-931e-41ae-94bd-d42220ab5f72_1726x1336.png 424w, https://substackcdn.com/image/fetch/$s_!yguQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73bab6bf-931e-41ae-94bd-d42220ab5f72_1726x1336.png 848w, https://substackcdn.com/image/fetch/$s_!yguQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73bab6bf-931e-41ae-94bd-d42220ab5f72_1726x1336.png 1272w, https://substackcdn.com/image/fetch/$s_!yguQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73bab6bf-931e-41ae-94bd-d42220ab5f72_1726x1336.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>So it&#8217;s not a vanilla collection view. And the performance is drastically different. </p><p>SwiftUI&#8217;s performance characteristics are constrained, fundamentally, by its architecture. I&#8217;ve always been saying that the beautiful, reactive, <em>automagical</em> data flow out-of-the-box comes with a cost:</p><ul><li><p>State changes cause SwiftUI to re-compute the body of affected views, perform diffing, and potentially calculate layout, before committing changes to be rendered. Apple can optimise this to death, but it&#8217;s never <em>not</em> going to add overhead.  </p></li><li><p>Although List applies cell reuse at the UIKit layer, this does little to mitigate costs: SwiftUI has already re-computed and reconciled the view hierarchy <strong>before</strong> reused cells are reconfigured with new data.</p></li><li><p>Even <strong>List</strong>, the paragon of high-performance SwiftUI, incurs bridging overhead. We can see this directly in the view debugger with UpdateCoalescingCollectionView.</p></li><li><p>SwiftUI rendering is gated behind unidirectional data-flow. Moving a gif around changes its @State properties and forces a view re-computation. UIKit offers a shortcut: you can <em>just transform the view itself</em>, no abstraction.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nfRz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18576a53-5eb3-4133-b35f-951ec4df83db_1162x756.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nfRz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18576a53-5eb3-4133-b35f-951ec4df83db_1162x756.png 424w, https://substackcdn.com/image/fetch/$s_!nfRz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18576a53-5eb3-4133-b35f-951ec4df83db_1162x756.png 848w, https://substackcdn.com/image/fetch/$s_!nfRz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18576a53-5eb3-4133-b35f-951ec4df83db_1162x756.png 1272w, https://substackcdn.com/image/fetch/$s_!nfRz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18576a53-5eb3-4133-b35f-951ec4df83db_1162x756.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nfRz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18576a53-5eb3-4133-b35f-951ec4df83db_1162x756.png" width="1162" height="756" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/18576a53-5eb3-4133-b35f-951ec4df83db_1162x756.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:756,&quot;width&quot;:1162,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:182212,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18576a53-5eb3-4133-b35f-951ec4df83db_1162x756.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nfRz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18576a53-5eb3-4133-b35f-951ec4df83db_1162x756.png 424w, https://substackcdn.com/image/fetch/$s_!nfRz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18576a53-5eb3-4133-b35f-951ec4df83db_1162x756.png 848w, https://substackcdn.com/image/fetch/$s_!nfRz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18576a53-5eb3-4133-b35f-951ec4df83db_1162x756.png 1272w, https://substackcdn.com/image/fetch/$s_!nfRz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18576a53-5eb3-4133-b35f-951ec4df83db_1162x756.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://gist.github.com/jacobsapps/aeade989be331206d90e27e4d9f47b7e">Gist</a></figcaption></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>What the future looks like for SwiftUI</h2><p>Mastodon went wild recently over <a href="https://mastodon.social/@stroughtonsmith/115808174025220815">a rumour shared</a> by <a href="https://mastodon.social/@stroughtonsmith">Steve Troughton-Smith</a>:</p><blockquote><p><em>&#128483;&#65039; I do enjoy a good rumor, so I&#8217;ll share this nugget:</em></p><p><em>I have heard that SwiftUI has been losing political capital, and credibility, internally at Apple because it has repeatedly failed to meet software engineering goals, and needs. It&#8217;s no longer thought of as the clear default choice for new stuff.</em></p><p><em>That might explain why it was deemphasized at WWDC compared to the past few years.</em></p></blockquote><p>Spicy stuff.</p><p>I look forward to the next edition of <a href="https://blog.timac.org/2024/1208-state-of-swift-and-swiftui-ios18/">Apple&#8217;s internal use of SwiftUI</a> by <a href="https://mastodon.social/@timac">Alexandre Colucci</a>. We can cross-reference whether this rumour is substantiated by seeing whether the SwiftUI usage has plateaued across the internal iOS binaries.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!47e-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff6914f1-c865-4c6a-b653-82a6b3cce5b2_1710x834.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!47e-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff6914f1-c865-4c6a-b653-82a6b3cce5b2_1710x834.png 424w, https://substackcdn.com/image/fetch/$s_!47e-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff6914f1-c865-4c6a-b653-82a6b3cce5b2_1710x834.png 848w, https://substackcdn.com/image/fetch/$s_!47e-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff6914f1-c865-4c6a-b653-82a6b3cce5b2_1710x834.png 1272w, https://substackcdn.com/image/fetch/$s_!47e-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff6914f1-c865-4c6a-b653-82a6b3cce5b2_1710x834.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!47e-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff6914f1-c865-4c6a-b653-82a6b3cce5b2_1710x834.png" width="1456" height="710" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ff6914f1-c865-4c6a-b653-82a6b3cce5b2_1710x834.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:710,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:150617,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184657452?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff6914f1-c865-4c6a-b653-82a6b3cce5b2_1710x834.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!47e-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff6914f1-c865-4c6a-b653-82a6b3cce5b2_1710x834.png 424w, https://substackcdn.com/image/fetch/$s_!47e-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff6914f1-c865-4c6a-b653-82a6b3cce5b2_1710x834.png 848w, https://substackcdn.com/image/fetch/$s_!47e-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff6914f1-c865-4c6a-b653-82a6b3cce5b2_1710x834.png 1272w, https://substackcdn.com/image/fetch/$s_!47e-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff6914f1-c865-4c6a-b653-82a6b3cce5b2_1710x834.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2>Last Orders</h2><p>In my experience using SwiftUI heavily at 5 companies, I&#8217;ve found that it&#8217;s really brilliant if you have a very understanding product or design team, who are happy for you to push back on certain design aspects, and compromise a little on detailed rendering minutiae.</p><p>When there&#8217;s a company-wide focus on UI performance, you&#8217;re going to have a bad time. You can do irreversible damage to your app architecture by pivoting away from SwiftUI after years, and incur cognitive overhead from switching between architectures forever into the future.</p><p>The biggest advantage of SwiftUI has always been the fast, easy-to-write declarative syntax. But with the rise of Agentic Engineering, the annoying overhead of writing programmatic UIKit code is negligible. </p><p>I hate to be the one to say it, so please do my job for me and whisper this quiet affirmation as you go into work this week:</p><p><em><strong>&#8220;SwiftUI is dead. Long live UIKit.&#8221;</strong></em></p><blockquote><h5><strong>Sponsored Link</strong></h5><h4><strong><a href="https://www.revenuecat.com/state-of-subscription-apps/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=sosa-2026">How iOS apps actually make money</a></strong></h4><p>RevenueCat's <a href="https://www.revenuecat.com/state-of-subscription-apps/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=sosa-2026">State of Subscription Apps</a> report is out, analyzing 115,000+ subscription apps and more than $16B in revenue. Use it to benchmark your pricing, trials, and conversion rates against what's actually working across the app economy.</p></blockquote><div><hr></div><blockquote><p><em>If you liked my post, subscribe free to join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week.</em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><blockquote><p><em>Not convinced yet? If you enjoyed this topic, consider taking a look at my related posts:</em></p></blockquote><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;e9529cf2-7169-4f19-adfc-482cd9db782e&quot;,&quot;caption&quot;:&quot;SwiftUI released in 2019, to tremendous excitement across the community. Unfortunately, it really sucked for that first year.<br /><br />I was building a satanic side hustle at the time, and figured I&#8217;d go all-in.&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;md&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;2025: The Year SwiftUI Died &quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:126930235,&quot;name&quot;:&quot;Jacob Bartlett&quot;,&quot;bio&quot;:&quot;Master iOS. Boost your salary. Join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week. Sign up free today!&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!s80e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feab1e065-dffc-4096-ad9e-826ddda8a6cd_1304x1304.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100}],&quot;post_date&quot;:&quot;2025-11-17T16:03:10.524Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!Hb7o!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77f634d6-203c-448e-973a-ac4c5f70beac_1680x1200.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.jacobstechtavern.com/p/the-year-swiftui-died&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:178585175,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:37,&quot;comment_count&quot;:0,&quot;publication_id&quot;:1376173,&quot;publication_name&quot;:&quot;Jacob&#8217;s Tech Tavern&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LJp-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee402e25-4e20-4683-ba5f-20ca86eb2b43_512x512.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;c3141b80-e333-4230-9351-835f9aaf4edb&quot;,&quot;caption&quot;:&quot;SwiftUI is like magic. But, like all well-designed magic systems, it comes with a cost.<br /><br />What, you thought that beautiful declarative syntax and automatic data bindings come free? Think again.&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;md&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;SwiftUI Scroll Performance: The 120FPS Challenge&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:126930235,&quot;name&quot;:&quot;Jacob Bartlett&quot;,&quot;bio&quot;:&quot;Master iOS. Boost your salary. Join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week. Sign up free today!&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!s80e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feab1e065-dffc-4096-ad9e-826ddda8a6cd_1304x1304.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100}],&quot;post_date&quot;:&quot;2025-05-05T15:00:38.653Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!yKru!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fd8d9ac-8e83-4402-9560-e04977e79472_1680x1200.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.jacobstechtavern.com/p/swiftui-scroll-performance-the-120fps&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:157793004,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:55,&quot;comment_count&quot;:5,&quot;publication_id&quot;:1376173,&quot;publication_name&quot;:&quot;Jacob&#8217;s Tech Tavern&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LJp-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee402e25-4e20-4683-ba5f-20ca86eb2b43_512x512.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div>]]></content:encoded></item><item><title><![CDATA[iOS System Design interviews in 2026]]></title><description><![CDATA[Practical prep advice based on three real-world interviews]]></description><link>https://blog.jacobstechtavern.com/p/system-design-interview</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/system-design-interview</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Tue, 03 Mar 2026 16:01:49 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!W376!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf8c6d62-2c5e-46bf-be22-6e1a1a56b5b3_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!W376!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf8c6d62-2c5e-46bf-be22-6e1a1a56b5b3_1680x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!W376!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf8c6d62-2c5e-46bf-be22-6e1a1a56b5b3_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!W376!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf8c6d62-2c5e-46bf-be22-6e1a1a56b5b3_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!W376!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf8c6d62-2c5e-46bf-be22-6e1a1a56b5b3_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!W376!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf8c6d62-2c5e-46bf-be22-6e1a1a56b5b3_1680x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!W376!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf8c6d62-2c5e-46bf-be22-6e1a1a56b5b3_1680x1200.png" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cf8c6d62-2c5e-46bf-be22-6e1a1a56b5b3_1680x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:2870282,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184333119?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf8c6d62-2c5e-46bf-be22-6e1a1a56b5b3_1680x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!W376!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf8c6d62-2c5e-46bf-be22-6e1a1a56b5b3_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!W376!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf8c6d62-2c5e-46bf-be22-6e1a1a56b5b3_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!W376!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf8c6d62-2c5e-46bf-be22-6e1a1a56b5b3_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!W376!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf8c6d62-2c5e-46bf-be22-6e1a1a56b5b3_1680x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The best-paying tech companies administer a <strong>system design round</strong> as part of their final-stage interview rounds. This interview, the successor to the classic <em>whiteboarding exercise</em>, challenges you to architect a complex system on iOS:</p><ul><li><p><em>Show me how you&#8217;d architect an encrypted messaging app.</em></p></li><li><p><em>Demonstrate how you&#8217;d structure a news feed on a social app.</em></p></li><li><p><em>Design an SDK fit for a large analytics company.</em></p></li></ul><p>There are virtually no resources online <em>(aside from expensive coaching)</em> that teach you to tackle these interviews for iOS roles.</p><p>Until now.</p><p>I went through an <a href="https://blog.jacobstechtavern.com/p/interview-grind">extremely intensive interview grind</a> at the end of 2025, and faced down <strong>three system design challenges at three different companies</strong>. I&#8217;m coming to you today with personal, hard-won experience.</p><p>The real meat and potatoes here is a full worked example: a real system design interview, demonstrating what you can expect from a system design round today and how to tackle the problem. For dessert, I&#8217;ll highlight all the parts of prep work that were <em>actually useful</em>, so your own grind can be efficient and <em>(mostly)</em> painless.</p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/184333119/a-framework-to-structure-every-interview">A framework to structure every interview</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/184333119/worked-example-ai-chat-app">A full worked example based on my recent interviews</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/184333119/important-practical-prep-notes">Miscellaneous practical tips to help you prepare</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/184333119/concepts-i-didnt-know-much-about">Common client-side design concepts I didn&#8217;t know about</a> </p></li><li><p><a href="https://blog.jacobstechtavern.com/i/184333119/last-orders">Last Orders (and a handy cheat sheet)</a></p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gRJn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7107948a-33f8-41fc-b980-7c0b4dfcce67.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gRJn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7107948a-33f8-41fc-b980-7c0b4dfcce67.png 424w, https://substackcdn.com/image/fetch/$s_!gRJn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7107948a-33f8-41fc-b980-7c0b4dfcce67.png 848w, https://substackcdn.com/image/fetch/$s_!gRJn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7107948a-33f8-41fc-b980-7c0b4dfcce67.png 1272w, https://substackcdn.com/image/fetch/$s_!gRJn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7107948a-33f8-41fc-b980-7c0b4dfcce67.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gRJn!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7107948a-33f8-41fc-b980-7c0b4dfcce67.png" width="1200" height="900" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7107948a-33f8-41fc-b980-7c0b4dfcce67.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1092,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:3117296,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/184333119?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7107948a-33f8-41fc-b980-7c0b4dfcce67.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gRJn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7107948a-33f8-41fc-b980-7c0b4dfcce67.png 424w, https://substackcdn.com/image/fetch/$s_!gRJn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7107948a-33f8-41fc-b980-7c0b4dfcce67.png 848w, https://substackcdn.com/image/fetch/$s_!gRJn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7107948a-33f8-41fc-b980-7c0b4dfcce67.png 1272w, https://substackcdn.com/image/fetch/$s_!gRJn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7107948a-33f8-41fc-b980-7c0b4dfcce67.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The enterprising free subscriber can avoid the paywall by skimming the sticky notes on my monitor.</figcaption></figure></div><h2>A framework to structure every interview </h2><p>A lot of interviewers these days will try to pretend that your interview is a casual chat. Don&#8217;t be fooled. Obviously, act natural, smile, but it will never hurt you to introduce some formality via a framework.</p><p>A framework is a simple structure you can follow to answer the problem. A reusable way of arranging your thoughts while you design the system. The framework goes like this:</p><ul><li><p>Scoping</p></li><li><p>Functional requirements</p></li><li><p>Non-functional requirements</p></li><li><p>Data model</p></li><li><p>API design</p></li><li><p>High-level design</p></li><li><p>Drill-down questions </p></li></ul><p>With system design, <strong>&#8220;measure twice, cut once&#8221;.</strong> You must understand the problem space and what needs to be designed before you draw anything. </p><p>As iOS developers, it&#8217;s tempting to dive straight into SwiftUI vs UIKit, MVVM vs MV vs VIPER, and your favourite concurrency toolkit. That&#8217;s a dangerous game: the system design interview is far more about data flow and structure than UI or frameworks.</p><p>Now let&#8217;s look at a full worked example of an interview, demonstrating how to tackle the interview systematically. This might be the best prep out there, because it&#8217;s based on three of the real final-stage panel interviews I did last month. </p><p>My worked example takes you through <strong>the most popular system design question out there today</strong>.</p><p>By the end, you&#8217;ll have the confidence to tackle your own iOS system design round. </p><blockquote><p><em>Upgrade to unlock this article, plus much more:</em></p><p><em>&#127775; Access <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, my exclusive advanced content <br>&#128640; Read <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> a month before anyone else <br>&#129525; Master concurrency with my <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course">full course</a> and <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced training</a></em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p>
      <p>
          <a href="https://blog.jacobstechtavern.com/p/system-design-interview">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[The Most Complicated System I Ever Worked On ]]></title><description><![CDATA[A ludicrously elaborate pipeline of webscraping, parsing, persistence, processing, and polling]]></description><link>https://blog.jacobstechtavern.com/p/the-most-complex-system</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/the-most-complex-system</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Tue, 17 Feb 2026 16:01:15 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!96Sb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3930417-9b6f-4942-89a0-16818ac8d68c_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!96Sb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3930417-9b6f-4942-89a0-16818ac8d68c_1680x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!96Sb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3930417-9b6f-4942-89a0-16818ac8d68c_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!96Sb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3930417-9b6f-4942-89a0-16818ac8d68c_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!96Sb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3930417-9b6f-4942-89a0-16818ac8d68c_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!96Sb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3930417-9b6f-4942-89a0-16818ac8d68c_1680x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!96Sb!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3930417-9b6f-4942-89a0-16818ac8d68c_1680x1200.png" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e3930417-9b6f-4942-89a0-16818ac8d68c_1680x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:4561209,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180491995?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3930417-9b6f-4942-89a0-16818ac8d68c_1680x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!96Sb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3930417-9b6f-4942-89a0-16818ac8d68c_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!96Sb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3930417-9b6f-4942-89a0-16818ac8d68c_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!96Sb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3930417-9b6f-4942-89a0-16818ac8d68c_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!96Sb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3930417-9b6f-4942-89a0-16818ac8d68c_1680x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Writing online is a lot like creating content on OnlyFans.</p><p>And I&#8217;m not just saying that because I&#8217;m very sexy.</p><p>I&#8217;m saying that because it has a strict power-law distribution. </p><p>There are several big names at the very top of the leaderboard that pull in millions of dollars a year. On the other side, there&#8217;s an incredibly long tail of people who make almost no money, perhaps with a tiny number of paid readers and/or simps.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HeQW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F584a691c-6613-4199-bcd7-9866a66358f5_1600x900.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HeQW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F584a691c-6613-4199-bcd7-9866a66358f5_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!HeQW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F584a691c-6613-4199-bcd7-9866a66358f5_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!HeQW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F584a691c-6613-4199-bcd7-9866a66358f5_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!HeQW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F584a691c-6613-4199-bcd7-9866a66358f5_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HeQW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F584a691c-6613-4199-bcd7-9866a66358f5_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/584a691c-6613-4199-bcd7-9866a66358f5_1600x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!HeQW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F584a691c-6613-4199-bcd7-9866a66358f5_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!HeQW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F584a691c-6613-4199-bcd7-9866a66358f5_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!HeQW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F584a691c-6613-4199-bcd7-9866a66358f5_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!HeQW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F584a691c-6613-4199-bcd7-9866a66358f5_1600x900.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Wow, TIL Substack was even more top-heavy than OnlyFans (<a href="https://x.com/adamry_n/status/1571503586236051456">source</a>)</figcaption></figure></div><p>Between the extremes, a quiet middle class at <a href="https://substack.com/leaderboard/technology/paid">#88 on the technology leaderboard</a> who are probably pulling in something like minimum wage (p.s. that&#8217;s exactly where I&#8217;m at, hence my recent job-hunt). </p><p>This power-law distribution shows up everywhere. In software engineering, it manifests in the complexity of problems that we work on day-to-day. There is a very long tail of everyday &#8220;build this screen&#8221; or &#8220;investigate this bug&#8221; that you can largely perform on autopilot. </p><p>There are regular mid-level challenges in the middle, that crop up every month or two: profile this subtle performance problem, or help architect this new feature. </p><p>Once in a blue moon; maybe just once in your career; you have to pull off something nobody&#8217;s built before. Something with so many moving parts it needs constant work to prevent it overwhelming your team.</p><p>This rare peak challenge is what I&#8217;m bringing to you today. The hardest engineering challenge I have ever faced. A one-of-a-kind feature that orchestrated an automated, client-side, comprehensive, high-volume data ingestion pipeline.</p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/180491995/webscraping-a-third-party-service">Webscraping a third party service</a> </p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180491995/long-running-downloading-jobs">Long-running downloading jobs</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180491995/parsing-and-storage-for-mb-of-data">Parsing and storage for ~200MB of data</a> </p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180491995/real-time-data-analysis">Real-time data analysis</a> </p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180491995/high-volume-data-upload-and-polling">High-volume data upload and polling</a> </p></li><li><p><a href="https://blog.jacobstechtavern.com/i/180491995/a-year-of-whack-a-mole">And, finally, the year of whack-a-mole to keep it working</a> </p></li></ul><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;a88cb798-2048-42fb-8ba4-56c6afb826f5&quot;,&quot;duration&quot;:null}"></div><p><a href="https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/">Building a reliable system on top of an unreliable system</a> is always quite traumatic, so please excuse my occasional abrupt screams as I write this. </p><p>The original pipeline allowed you to fetch your Google data, which could reach Gigabyte scale for each user, the root of much of the complexity. For this example, however, I&#8217;m doing the same thing with <strong>my Spotify data</strong>, because open-sourcing my music search history in the sample project will be less likely to get me arrested.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8-ZR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6dd20c-b243-4f1c-95bc-dbf3602df9de_1856x1300.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8-ZR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6dd20c-b243-4f1c-95bc-dbf3602df9de_1856x1300.png 424w, https://substackcdn.com/image/fetch/$s_!8-ZR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6dd20c-b243-4f1c-95bc-dbf3602df9de_1856x1300.png 848w, https://substackcdn.com/image/fetch/$s_!8-ZR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6dd20c-b243-4f1c-95bc-dbf3602df9de_1856x1300.png 1272w, https://substackcdn.com/image/fetch/$s_!8-ZR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6dd20c-b243-4f1c-95bc-dbf3602df9de_1856x1300.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8-ZR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6dd20c-b243-4f1c-95bc-dbf3602df9de_1856x1300.png" width="1456" height="1020" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6c6dd20c-b243-4f1c-95bc-dbf3602df9de_1856x1300.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1020,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:424409,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/180491995?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6dd20c-b243-4f1c-95bc-dbf3602df9de_1856x1300.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!8-ZR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6dd20c-b243-4f1c-95bc-dbf3602df9de_1856x1300.png 424w, https://substackcdn.com/image/fetch/$s_!8-ZR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6dd20c-b243-4f1c-95bc-dbf3602df9de_1856x1300.png 848w, https://substackcdn.com/image/fetch/$s_!8-ZR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6dd20c-b243-4f1c-95bc-dbf3602df9de_1856x1300.png 1272w, https://substackcdn.com/image/fetch/$s_!8-ZR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6dd20c-b243-4f1c-95bc-dbf3602df9de_1856x1300.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://www.youtube.com/watch?v=cNgyuHtBBW8&amp;list=RDcNgyuHtBBW8">It&#8217;s a certified banger, I swear</a></figcaption></figure></div><p>I didn&#8217;t build this bad boy from scratch. This system was inherited MVP form, by an engineer who is a lot more intelligent than me. I did, however, have the pleasure of spending a year hardening the pipeline from a neat (but fragile) pipeline into a battle-hardened production system that worked robustly.</p><p>This article comes complete with the full sample project, demoing the whole pipeline in its glory (with companion server code!)</p><p>Come and see the man-made horrors beyond your comprehension.</p><div><hr></div><blockquote><p><em>Paid members get the full article, and a lot more:</em></p><p><em>&#127775; Access <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, my exclusive advanced content <br>&#128640; Read <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> a month before anyone else <br>&#129525; Master concurrency with my <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course">full course</a> and <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced training</a></em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p>
      <p>
          <a href="https://blog.jacobstechtavern.com/p/the-most-complex-system">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Agentic AI Engineering Workflows for iOS in 2026]]></title><description><![CDATA[Cargo culting the creator of Claude Code]]></description><link>https://blog.jacobstechtavern.com/p/agentic-ai-2026</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/agentic-ai-2026</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Mon, 09 Feb 2026 16:02:05 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!URlT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce76c33c-c026-43e7-a243-c87284820768_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!URlT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce76c33c-c026-43e7-a243-c87284820768_1680x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!URlT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce76c33c-c026-43e7-a243-c87284820768_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!URlT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce76c33c-c026-43e7-a243-c87284820768_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!URlT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce76c33c-c026-43e7-a243-c87284820768_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!URlT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce76c33c-c026-43e7-a243-c87284820768_1680x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!URlT!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce76c33c-c026-43e7-a243-c87284820768_1680x1200.png" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ce76c33c-c026-43e7-a243-c87284820768_1680x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:3510738,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce76c33c-c026-43e7-a243-c87284820768_1680x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!URlT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce76c33c-c026-43e7-a243-c87284820768_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!URlT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce76c33c-c026-43e7-a243-c87284820768_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!URlT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce76c33c-c026-43e7-a243-c87284820768_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!URlT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce76c33c-c026-43e7-a243-c87284820768_1680x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The last 6 months have been the most tumultuous period ever in the field of software engineering. More than compilers. More than the internet. Maybe even more than the transistor.</p><p>In late 2025, a Rubicon was crossed. In March last year, we all laughed at the Anthropic CEO for his prediction that &#8220;within 6 months, <a href="https://news.ycombinator.com/item?id=44921825">90% of code will be written by AI</a>&#8221;. Today, among software engineers, there are 2 camps emerging: </p><ul><li><p>Default to AI, with a vast majority of code <em>not</em> hand-typed.</p></li><li><p>Still hand-coding by default, pasting into chat windows for help.</p></li></ul><p>I&#8217;ve heard this story more than once: a very senior, serious engineer at a company will trial AI for the first time, with a big refactor. After a few days, they&#8217;ll debrief the team, explaining that it isn&#8217;t quite what it&#8217;s cracked up to be, and a distraction. The punchline is they were using f*cking Copilot.</p><p>I had a recent, quite eye-opening, Twitter exchange: someone claimed <em>&#8220;AI is bad at programming&#8221;</em>, then proved it by showing me a half-baked prompt in a web chat, asking about a Steam API, and getting a hallucinated response.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0xRj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f214b95-8f47-4be0-bfae-c6a02e191a4a_1546x902.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0xRj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f214b95-8f47-4be0-bfae-c6a02e191a4a_1546x902.png 424w, https://substackcdn.com/image/fetch/$s_!0xRj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f214b95-8f47-4be0-bfae-c6a02e191a4a_1546x902.png 848w, https://substackcdn.com/image/fetch/$s_!0xRj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f214b95-8f47-4be0-bfae-c6a02e191a4a_1546x902.png 1272w, https://substackcdn.com/image/fetch/$s_!0xRj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f214b95-8f47-4be0-bfae-c6a02e191a4a_1546x902.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0xRj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f214b95-8f47-4be0-bfae-c6a02e191a4a_1546x902.png" width="1456" height="849" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2f214b95-8f47-4be0-bfae-c6a02e191a4a_1546x902.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:849,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:178242,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f214b95-8f47-4be0-bfae-c6a02e191a4a_1546x902.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0xRj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f214b95-8f47-4be0-bfae-c6a02e191a4a_1546x902.png 424w, https://substackcdn.com/image/fetch/$s_!0xRj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f214b95-8f47-4be0-bfae-c6a02e191a4a_1546x902.png 848w, https://substackcdn.com/image/fetch/$s_!0xRj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f214b95-8f47-4be0-bfae-c6a02e191a4a_1546x902.png 1272w, https://substackcdn.com/image/fetch/$s_!0xRj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f214b95-8f47-4be0-bfae-c6a02e191a4a_1546x902.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This was insane to me! How did this person not know to open Codex in a terminal, set high thinking mode, paste the link to the relevant documentation, and ask it to make the change in your codebase!? </p><div><hr></div><p>To use AI tooling effectively, you need experience. Specifically, finding a workflow that is effective for you. I became proficient with Claude Code over summer, and rapidly my entire daily workflow changed around it. </p><p>But things have moved really fast.</p><p>My default approach: <em>&#8220;big detailed prompt, oneshot, then optimise&#8221;</em> is great for <a href="https://blog.jacobstechtavern.com/p/the-design-system-war">sample projects</a> and <a href="https://blog.jacobstechtavern.com/p/interview-grind">takehome tests</a>, but is weaker for larger, more complex projects. </p><p>I need to optimise my workflow some more. </p><p>So. </p><p>Today I&#8217;m going to revisit the state of the art, address any FOMO you might have from boycotting Tech Twitter&#8482;, and discover the novel techniques I&#8217;m missing. <strong>Specifically, what&#8217;s useful for iOS development.</strong> </p><p>Next, I&#8217;m going to set up the workflow <a href="https://x.com/bcherny/status/2007179832300581177">used by Boris Cherny</a>, the guy who invented Claude Code, a <em>&#8220;vanilla&#8221;</em> approach involving orchestration between 15 parallel agents.</p><p>Finally, I&#8217;ll test drive this approach by building an app I first envisioned in 2020: <strong>Maxwell</strong>.</p><div><hr></div><h5><strong>Sponsored Link</strong></h5><h4><strong><a href="https://www.revenuecat.com/blog/engineering/paywalls-changelog/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=paywalls">RevenueCat Paywalls: Build &amp; iterate subscription flows faster</a></strong></h4><blockquote><p>RevenueCat Paywalls just added a steady stream of new features: more templates, deeper customization, better previews, and new promo tools. <a href="https://www.revenuecat.com/blog/engineering/paywalls-changelog/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=paywalls">Check the Paywalls changelog</a> and keep improving your subscription flows as new capabilities ship.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ywUg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1838418-3f4a-49e9-a95a-284d9a9cc30c_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ywUg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1838418-3f4a-49e9-a95a-284d9a9cc30c_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ywUg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1838418-3f4a-49e9-a95a-284d9a9cc30c_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ywUg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1838418-3f4a-49e9-a95a-284d9a9cc30c_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ywUg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1838418-3f4a-49e9-a95a-284d9a9cc30c_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ywUg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1838418-3f4a-49e9-a95a-284d9a9cc30c_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e1838418-3f4a-49e9-a95a-284d9a9cc30c_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2580801,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1838418-3f4a-49e9-a95a-284d9a9cc30c_1024x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ywUg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1838418-3f4a-49e9-a95a-284d9a9cc30c_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ywUg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1838418-3f4a-49e9-a95a-284d9a9cc30c_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ywUg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1838418-3f4a-49e9-a95a-284d9a9cc30c_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ywUg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1838418-3f4a-49e9-a95a-284d9a9cc30c_1024x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Contents</h2><ul><li><p><a href="https://blog.jacobstechtavern.com/i/185165895/the-state-of-the-art">The State of the Art</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/185165895/the-best-models">The Best Models</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185165895/mcp-verification-and-xcode-263">MCP, Verification, and Xcode 26.3</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185165895/multi-agent-and-orchestration">Multi-agent and Orchestration</a> </p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185165895/agentsmd-and-skills">AGENTS.md and Skills</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185165895/teleporting-sessions-to-the-web">Teleporting Sessions to the Web</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185165895/tab-completion">Tab Completion</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185165895/the-ralph-loop">The Ralph Loop</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185165895/openclaw-aka-clawdbot">OpenClaw (aka Clawdbot)</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/185165895/cargo-culting-the-creator-of-claude-code">Cargo-Culting the Creator of Claude Code</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185165895/building-maxwell-in-a-day">Building Maxwell in an afternoon</a> </p></li><li><p><a href="https://blog.jacobstechtavern.com/i/185165895/last-orders">Last Orders</a></p></li></ul><div><hr></div><h2>The State of the Art</h2><p>I already wrote about my early agentic workflow in September 2025. It&#8217;s a good piece. If you are unfamiliar with using agentic AI to code, it is a great introduction.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;2bdf2e81-9c70-4b0b-aa7d-7c0a158fb302&quot;,&quot;caption&quot;:&quot;50-100% productivity gains echoes the fantasy sold to you by grifters selling $997 AI courses on Twitter. If that&#8217;s the case, I&#8217;m missing a trick charging $12/month. Because it&#8217;s legit.&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;md&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Claude Code has made me 50-100% more productive&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:126930235,&quot;name&quot;:&quot;Jacob Bartlett&quot;,&quot;bio&quot;:&quot;Master iOS. Boost your salary. Join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week. Sign up free today!&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!s80e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feab1e065-dffc-4096-ad9e-826ddda8a6cd_1304x1304.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100}],&quot;post_date&quot;:&quot;2025-09-02T15:02:30.684Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!mGPq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38e800aa-9c34-4664-8949-b7c5af8bff70_1680x1200.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.jacobstechtavern.com/p/claude-code-productivity&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:170755884,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:16,&quot;comment_count&quot;:2,&quot;publication_id&quot;:1376173,&quot;publication_name&quot;:&quot;Jacob&#8217;s Tech Tavern&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LJp-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee402e25-4e20-4683-ba5f-20ca86eb2b43_512x512.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p>But there are a <em>ton</em> of new developments, innovations, and tools in the GPT-5.2 and Opus 4.5 era which massively impact your day-to-day, especially in iOS. </p><p>Let&#8217;s cover some:</p><div><hr></div><h4>The Best Models</h4><p><s>Codex (5.2) and Claude Code (Opus 4.5) are the best models </s><strong><s>by far</s></strong><s>. </s></p><p><s>At the time of writing, </s><strong><s>gpt-5.2-codex</s></strong><s> is unambiguously the best, thinks carefully, and makes fewer mistakes than other models.</s></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qHCc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea1a93e-b7e3-49fe-8670-1656107a0c63_1984x324.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qHCc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea1a93e-b7e3-49fe-8670-1656107a0c63_1984x324.png 424w, https://substackcdn.com/image/fetch/$s_!qHCc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea1a93e-b7e3-49fe-8670-1656107a0c63_1984x324.png 848w, https://substackcdn.com/image/fetch/$s_!qHCc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea1a93e-b7e3-49fe-8670-1656107a0c63_1984x324.png 1272w, https://substackcdn.com/image/fetch/$s_!qHCc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea1a93e-b7e3-49fe-8670-1656107a0c63_1984x324.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qHCc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea1a93e-b7e3-49fe-8670-1656107a0c63_1984x324.png" width="1456" height="238" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aea1a93e-b7e3-49fe-8670-1656107a0c63_1984x324.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:238,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:206955,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea1a93e-b7e3-49fe-8670-1656107a0c63_1984x324.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qHCc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea1a93e-b7e3-49fe-8670-1656107a0c63_1984x324.png 424w, https://substackcdn.com/image/fetch/$s_!qHCc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea1a93e-b7e3-49fe-8670-1656107a0c63_1984x324.png 848w, https://substackcdn.com/image/fetch/$s_!qHCc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea1a93e-b7e3-49fe-8670-1656107a0c63_1984x324.png 1272w, https://substackcdn.com/image/fetch/$s_!qHCc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea1a93e-b7e3-49fe-8670-1656107a0c63_1984x324.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p><strong>Update the Friday before this published</strong>: <br><strong>Opus 4.6</strong> and <strong>Codex 5.3</strong> just came out! The jury&#8217;s out on which is better. This will be me over the weekend: </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jFZx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7546b2-c2de-4029-86a9-c06de89e98ee_908x1148.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jFZx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7546b2-c2de-4029-86a9-c06de89e98ee_908x1148.png 424w, https://substackcdn.com/image/fetch/$s_!jFZx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7546b2-c2de-4029-86a9-c06de89e98ee_908x1148.png 848w, https://substackcdn.com/image/fetch/$s_!jFZx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7546b2-c2de-4029-86a9-c06de89e98ee_908x1148.png 1272w, https://substackcdn.com/image/fetch/$s_!jFZx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7546b2-c2de-4029-86a9-c06de89e98ee_908x1148.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jFZx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7546b2-c2de-4029-86a9-c06de89e98ee_908x1148.png" width="908" height="1148" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fb7546b2-c2de-4029-86a9-c06de89e98ee_908x1148.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1148,&quot;width&quot;:908,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1546399,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7546b2-c2de-4029-86a9-c06de89e98ee_908x1148.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jFZx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7546b2-c2de-4029-86a9-c06de89e98ee_908x1148.png 424w, https://substackcdn.com/image/fetch/$s_!jFZx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7546b2-c2de-4029-86a9-c06de89e98ee_908x1148.png 848w, https://substackcdn.com/image/fetch/$s_!jFZx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7546b2-c2de-4029-86a9-c06de89e98ee_908x1148.png 1272w, https://substackcdn.com/image/fetch/$s_!jFZx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7546b2-c2de-4029-86a9-c06de89e98ee_908x1148.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>You can also configure the <em>reasoning level</em> which gives the model extra time to reason through a problem and think about each step carefully. I get really good results by defaulting to <em>High</em>. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!G_YR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13775f-1636-4c1a-8899-140f5b375da0_1982x292.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G_YR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13775f-1636-4c1a-8899-140f5b375da0_1982x292.png 424w, https://substackcdn.com/image/fetch/$s_!G_YR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13775f-1636-4c1a-8899-140f5b375da0_1982x292.png 848w, https://substackcdn.com/image/fetch/$s_!G_YR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13775f-1636-4c1a-8899-140f5b375da0_1982x292.png 1272w, https://substackcdn.com/image/fetch/$s_!G_YR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13775f-1636-4c1a-8899-140f5b375da0_1982x292.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G_YR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13775f-1636-4c1a-8899-140f5b375da0_1982x292.png" width="1456" height="215" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/af13775f-1636-4c1a-8899-140f5b375da0_1982x292.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:215,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:168697,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13775f-1636-4c1a-8899-140f5b375da0_1982x292.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!G_YR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13775f-1636-4c1a-8899-140f5b375da0_1982x292.png 424w, https://substackcdn.com/image/fetch/$s_!G_YR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13775f-1636-4c1a-8899-140f5b375da0_1982x292.png 848w, https://substackcdn.com/image/fetch/$s_!G_YR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13775f-1636-4c1a-8899-140f5b375da0_1982x292.png 1272w, https://substackcdn.com/image/fetch/$s_!G_YR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf13775f-1636-4c1a-8899-140f5b375da0_1982x292.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>If you start to run out of weekly credits, you might consider dropping down to Medium. This will lead to a lot of really dumb mistakes&#8230;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pRE0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b18d1b-5736-4022-b0bb-500b624ecbaf_1786x1142.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pRE0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b18d1b-5736-4022-b0bb-500b624ecbaf_1786x1142.png 424w, https://substackcdn.com/image/fetch/$s_!pRE0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b18d1b-5736-4022-b0bb-500b624ecbaf_1786x1142.png 848w, https://substackcdn.com/image/fetch/$s_!pRE0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b18d1b-5736-4022-b0bb-500b624ecbaf_1786x1142.png 1272w, https://substackcdn.com/image/fetch/$s_!pRE0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b18d1b-5736-4022-b0bb-500b624ecbaf_1786x1142.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pRE0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b18d1b-5736-4022-b0bb-500b624ecbaf_1786x1142.png" width="1456" height="931" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/62b18d1b-5736-4022-b0bb-500b624ecbaf_1786x1142.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:931,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:269897,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185286257?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b18d1b-5736-4022-b0bb-500b624ecbaf_1786x1142.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!pRE0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b18d1b-5736-4022-b0bb-500b624ecbaf_1786x1142.png 424w, https://substackcdn.com/image/fetch/$s_!pRE0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b18d1b-5736-4022-b0bb-500b624ecbaf_1786x1142.png 848w, https://substackcdn.com/image/fetch/$s_!pRE0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b18d1b-5736-4022-b0bb-500b624ecbaf_1786x1142.png 1272w, https://substackcdn.com/image/fetch/$s_!pRE0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b18d1b-5736-4022-b0bb-500b624ecbaf_1786x1142.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>My beautiful team of crack nerds locked in a basement turns into a dim primary school class that can&#8217;t be left alone for 30 seconds.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QPa8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff33a6dc6-9eb1-4068-b552-4e094e457a7e_2444x786.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QPa8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff33a6dc6-9eb1-4068-b552-4e094e457a7e_2444x786.png 424w, https://substackcdn.com/image/fetch/$s_!QPa8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff33a6dc6-9eb1-4068-b552-4e094e457a7e_2444x786.png 848w, https://substackcdn.com/image/fetch/$s_!QPa8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff33a6dc6-9eb1-4068-b552-4e094e457a7e_2444x786.png 1272w, https://substackcdn.com/image/fetch/$s_!QPa8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff33a6dc6-9eb1-4068-b552-4e094e457a7e_2444x786.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QPa8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff33a6dc6-9eb1-4068-b552-4e094e457a7e_2444x786.png" width="1456" height="468" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f33a6dc6-9eb1-4068-b552-4e094e457a7e_2444x786.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:468,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2754413,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185286257?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff33a6dc6-9eb1-4068-b552-4e094e457a7e_2444x786.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!QPa8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff33a6dc6-9eb1-4068-b552-4e094e457a7e_2444x786.png 424w, https://substackcdn.com/image/fetch/$s_!QPa8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff33a6dc6-9eb1-4068-b552-4e094e457a7e_2444x786.png 848w, https://substackcdn.com/image/fetch/$s_!QPa8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff33a6dc6-9eb1-4068-b552-4e094e457a7e_2444x786.png 1272w, https://substackcdn.com/image/fetch/$s_!QPa8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff33a6dc6-9eb1-4068-b552-4e094e457a7e_2444x786.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I guess I need to upgrade my plan.</p><div><hr></div><h4>MCP, Verification, and Xcode 26.3</h4><p>One of the most critical missing links in an AI workflow, especially on iOS, is a way for the agent to autonomously verify its work.</p><p>You can verify via compiles, running unit tests, or manually on the simulator. </p><p>Unfortunately, AI tools don&#8217;t get access to any of these <strong>xcodebuild</strong> functionalities by default, since Xcode and its underlying tools are sandboxed away from agent permissions. </p><p>That&#8217;s where XcodeBuildMCP (by <a href="https://x.com/camsoft2000">camsoft2000</a>) comes in: it enables agents to interact with Xcode tools, including compiling your code, testing, and even interacting with features in the simulator <em>(though recently <a href="https://x.com/camsoft2000/status/2010084485732413835">agents have learned</a> to at least compile)</em>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4LfU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada2bc70-98e2-4814-b30a-4ce8c2b114e3_2590x1028.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4LfU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada2bc70-98e2-4814-b30a-4ce8c2b114e3_2590x1028.png 424w, https://substackcdn.com/image/fetch/$s_!4LfU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada2bc70-98e2-4814-b30a-4ce8c2b114e3_2590x1028.png 848w, https://substackcdn.com/image/fetch/$s_!4LfU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada2bc70-98e2-4814-b30a-4ce8c2b114e3_2590x1028.png 1272w, https://substackcdn.com/image/fetch/$s_!4LfU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada2bc70-98e2-4814-b30a-4ce8c2b114e3_2590x1028.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4LfU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada2bc70-98e2-4814-b30a-4ce8c2b114e3_2590x1028.png" width="1456" height="578" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ada2bc70-98e2-4814-b30a-4ce8c2b114e3_2590x1028.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:578,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2949079,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada2bc70-98e2-4814-b30a-4ce8c2b114e3_2590x1028.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4LfU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada2bc70-98e2-4814-b30a-4ce8c2b114e3_2590x1028.png 424w, https://substackcdn.com/image/fetch/$s_!4LfU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada2bc70-98e2-4814-b30a-4ce8c2b114e3_2590x1028.png 848w, https://substackcdn.com/image/fetch/$s_!4LfU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada2bc70-98e2-4814-b30a-4ce8c2b114e3_2590x1028.png 1272w, https://substackcdn.com/image/fetch/$s_!4LfU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada2bc70-98e2-4814-b30a-4ce8c2b114e3_2590x1028.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://www.xcodebuildmcp.com">XcodeBuildMCP</a></figcaption></figure></div><p>Setting up this verification workflow is the #1 most important productivity unlock in agentic engineering. </p><p>If you don&#8217;t need to run the full simulator, <a href="https://x.com/twannl/status/2019398446671921224">SwiftLee</a> shared a neat trick: using the <a href="https://github.com/ldomaradzki/xcsift">xcsift</a> library runs xcodebuild commands for build and test, but drastically cuts down the token usage from the hefty build reports, to save your context window.</p><p>And, naturally, I have to mention the biggest, hot-off-the-press-the-paper-is-still-warm announcement: Xcode 26.3 and agentic coding.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!x_A5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd691a7e2-c547-4d20-88c2-bef5c838b19e_1758x1196.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!x_A5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd691a7e2-c547-4d20-88c2-bef5c838b19e_1758x1196.png 424w, https://substackcdn.com/image/fetch/$s_!x_A5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd691a7e2-c547-4d20-88c2-bef5c838b19e_1758x1196.png 848w, https://substackcdn.com/image/fetch/$s_!x_A5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd691a7e2-c547-4d20-88c2-bef5c838b19e_1758x1196.png 1272w, https://substackcdn.com/image/fetch/$s_!x_A5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd691a7e2-c547-4d20-88c2-bef5c838b19e_1758x1196.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!x_A5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd691a7e2-c547-4d20-88c2-bef5c838b19e_1758x1196.png" width="1456" height="991" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d691a7e2-c547-4d20-88c2-bef5c838b19e_1758x1196.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:991,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:973655,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd691a7e2-c547-4d20-88c2-bef5c838b19e_1758x1196.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!x_A5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd691a7e2-c547-4d20-88c2-bef5c838b19e_1758x1196.png 424w, https://substackcdn.com/image/fetch/$s_!x_A5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd691a7e2-c547-4d20-88c2-bef5c838b19e_1758x1196.png 848w, https://substackcdn.com/image/fetch/$s_!x_A5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd691a7e2-c547-4d20-88c2-bef5c838b19e_1758x1196.png 1272w, https://substackcdn.com/image/fetch/$s_!x_A5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd691a7e2-c547-4d20-88c2-bef5c838b19e_1758x1196.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">From <a href="https://www.apple.com/uk/newsroom/2026/02/xcode-26-point-3-unlocks-the-power-of-agentic-coding/">Apple Newsroom</a></figcaption></figure></div><p>Xcode 26.3 introduces its own first-party MCP support for verification, as well as introducing a support for Claude Code and Codex agents directly inside the GUI. I can only hope their harness doesn&#8217;t suck.</p><p>You can set up the MCP for any agent <a href="https://developer.apple.com/documentation/xcode/giving-agentic-coding-tools-access-to-xcode">using these docs</a>.</p><div><hr></div><h4>Multi-agent and Orchestration</h4><p>We&#8217;ve picked the best model, set the reasoning budget to &#8220;high&#8221;, and now we have the agent automatically verifying its work via XcodeBuildMCP. Amazing! </p><p>But now it&#8217;s taking 10 minutes to work after being asked to make a change.</p><p>How can we handle this latency? We introduce a multi-agent workflow! </p><p>This is exactly what it sounds: running multiple instances of the CLI and context-switching between tasks as they work in parallel.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0UYi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52aeadf1-dffb-4ab4-862a-bbe46cdf60c3_1698x1040.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0UYi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52aeadf1-dffb-4ab4-862a-bbe46cdf60c3_1698x1040.png 424w, https://substackcdn.com/image/fetch/$s_!0UYi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52aeadf1-dffb-4ab4-862a-bbe46cdf60c3_1698x1040.png 848w, https://substackcdn.com/image/fetch/$s_!0UYi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52aeadf1-dffb-4ab4-862a-bbe46cdf60c3_1698x1040.png 1272w, https://substackcdn.com/image/fetch/$s_!0UYi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52aeadf1-dffb-4ab4-862a-bbe46cdf60c3_1698x1040.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0UYi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52aeadf1-dffb-4ab4-862a-bbe46cdf60c3_1698x1040.png" width="1456" height="892" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/52aeadf1-dffb-4ab4-862a-bbe46cdf60c3_1698x1040.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:892,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:464109,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52aeadf1-dffb-4ab4-862a-bbe46cdf60c3_1698x1040.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!0UYi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52aeadf1-dffb-4ab4-862a-bbe46cdf60c3_1698x1040.png 424w, https://substackcdn.com/image/fetch/$s_!0UYi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52aeadf1-dffb-4ab4-862a-bbe46cdf60c3_1698x1040.png 848w, https://substackcdn.com/image/fetch/$s_!0UYi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52aeadf1-dffb-4ab4-862a-bbe46cdf60c3_1698x1040.png 1272w, https://substackcdn.com/image/fetch/$s_!0UYi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52aeadf1-dffb-4ab4-862a-bbe46cdf60c3_1698x1040.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Orchestration</em> takes this further, automating multi-agent workflows via open-source tools. They spawn specialised agents under a supervisor with shared memory, task decomposition, and handoff, creating separate agents for tasks like planning, coding, testing, and review.</p><p>In my experience, multi-agent is very good and productive, with the engineer as the orchestrator. Automatic orchestration is a little too rich for my blood, but you can read <a href="https://maggieappleton.com/gastown">this great post about Gas Town</a> if you want the full scoop.</p><p>Unfortunately, on iOS at least, multi-agent and automatic verification can cause problems: with XcodeBuildMCP, only one build is allowed at once, and you can run into annoying DerivedData build errors with two simultaneous builds.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!owea!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17329811-da68-4b3a-a04c-fb149cccfd3a_1688x456.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!owea!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17329811-da68-4b3a-a04c-fb149cccfd3a_1688x456.png 424w, https://substackcdn.com/image/fetch/$s_!owea!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17329811-da68-4b3a-a04c-fb149cccfd3a_1688x456.png 848w, https://substackcdn.com/image/fetch/$s_!owea!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17329811-da68-4b3a-a04c-fb149cccfd3a_1688x456.png 1272w, https://substackcdn.com/image/fetch/$s_!owea!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17329811-da68-4b3a-a04c-fb149cccfd3a_1688x456.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!owea!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17329811-da68-4b3a-a04c-fb149cccfd3a_1688x456.png" width="1456" height="393" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/17329811-da68-4b3a-a04c-fb149cccfd3a_1688x456.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:393,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:164230,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17329811-da68-4b3a-a04c-fb149cccfd3a_1688x456.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!owea!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17329811-da68-4b3a-a04c-fb149cccfd3a_1688x456.png 424w, https://substackcdn.com/image/fetch/$s_!owea!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17329811-da68-4b3a-a04c-fb149cccfd3a_1688x456.png 848w, https://substackcdn.com/image/fetch/$s_!owea!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17329811-da68-4b3a-a04c-fb149cccfd3a_1688x456.png 1272w, https://substackcdn.com/image/fetch/$s_!owea!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17329811-da68-4b3a-a04c-fb149cccfd3a_1688x456.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Setting your terminal client to send notifications is a godsend with multi-agent, because you can immediately jump to the tab with completed tasks and re-prompt. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ME1d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5e761-3b49-4526-b575-c80bf71d8968_3024x670.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ME1d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5e761-3b49-4526-b575-c80bf71d8968_3024x670.png 424w, https://substackcdn.com/image/fetch/$s_!ME1d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5e761-3b49-4526-b575-c80bf71d8968_3024x670.png 848w, https://substackcdn.com/image/fetch/$s_!ME1d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5e761-3b49-4526-b575-c80bf71d8968_3024x670.png 1272w, https://substackcdn.com/image/fetch/$s_!ME1d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5e761-3b49-4526-b575-c80bf71d8968_3024x670.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ME1d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5e761-3b49-4526-b575-c80bf71d8968_3024x670.png" width="1456" height="323" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e6b5e761-3b49-4526-b575-c80bf71d8968_3024x670.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:323,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:374994,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185286257?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5e761-3b49-4526-b575-c80bf71d8968_3024x670.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!ME1d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5e761-3b49-4526-b575-c80bf71d8968_3024x670.png 424w, https://substackcdn.com/image/fetch/$s_!ME1d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5e761-3b49-4526-b575-c80bf71d8968_3024x670.png 848w, https://substackcdn.com/image/fetch/$s_!ME1d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5e761-3b49-4526-b575-c80bf71d8968_3024x670.png 1272w, https://substackcdn.com/image/fetch/$s_!ME1d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b5e761-3b49-4526-b575-c80bf71d8968_3024x670.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div><hr></div><h4>AGENTS.md and Skills</h4><p>The open-source community has been taking iOS pain points and documenting them for posterity. Paul Hudson <a href="https://github.com/twostraws/SwiftAgents">open-sourced an AGENTS.md file</a> designed to guide LLMs to shed bad habits and write more idiomatic SwiftUI. Unfortunately, it&#8217;s not had a ton of community input since release. </p><p>What I was surprised by, is that the agents have become GOOD at following and remembering instructions in this file in the last few months. To the extent where it&#8217;s nearly pedantic: <em>no, you don&#8217;t need to write a plan when I ask you to checkout a new branch</em>.</p><p>They are also great at using their skills without being asked:</p><p><a href="https://developers.openai.com/codex/skills/">Codex</a> and <a href="https://code.claude.com/docs/en/skills">Claude Code</a> have Skills, a feature that allows you to pre-package instructions, resources, and scripts to improve performance on repeatable workflows</p><p>Thomas Ricouard (legend) has <a href="https://dimillian.github.io/Skills/">open-sourced a number of skills</a> useful in iOS including SwiftUI performance auditing, SPM app packaging, and Swift 6.2 Concurrency adoption.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CXmx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbde9af90-d1f4-4ee1-8644-7512d836d3ea_2246x992.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CXmx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbde9af90-d1f4-4ee1-8644-7512d836d3ea_2246x992.png 424w, https://substackcdn.com/image/fetch/$s_!CXmx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbde9af90-d1f4-4ee1-8644-7512d836d3ea_2246x992.png 848w, https://substackcdn.com/image/fetch/$s_!CXmx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbde9af90-d1f4-4ee1-8644-7512d836d3ea_2246x992.png 1272w, https://substackcdn.com/image/fetch/$s_!CXmx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbde9af90-d1f4-4ee1-8644-7512d836d3ea_2246x992.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CXmx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbde9af90-d1f4-4ee1-8644-7512d836d3ea_2246x992.png" width="1456" height="643" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bde9af90-d1f4-4ee1-8644-7512d836d3ea_2246x992.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:643,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:311072,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbde9af90-d1f4-4ee1-8644-7512d836d3ea_2246x992.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CXmx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbde9af90-d1f4-4ee1-8644-7512d836d3ea_2246x992.png 424w, https://substackcdn.com/image/fetch/$s_!CXmx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbde9af90-d1f4-4ee1-8644-7512d836d3ea_2246x992.png 848w, https://substackcdn.com/image/fetch/$s_!CXmx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbde9af90-d1f4-4ee1-8644-7512d836d3ea_2246x992.png 1272w, https://substackcdn.com/image/fetch/$s_!CXmx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbde9af90-d1f4-4ee1-8644-7512d836d3ea_2246x992.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">From <a href="https://github.com/Dimillian/Skills/blob/main/swift-concurrency-expert/SKILL.md">swift-concurrency-expert</a> by Thomas Richard</figcaption></figure></div><p>What Codex 5.2 does better than any model before: it actually reliably uses skills when appropriate, and follows the instructions you configure. You can set up your AGENTS.md file with a specific workflow: </p><ul><li><p>Always pull main and check out a new branch before work.</p></li><li><p>Always document a plan and get my sign-off before changing code.</p></li><li><p>Always verify your work via compile/test/run with XcodeBuildMCP.</p></li></ul><p>And it will follow this to the letter!</p><p>Recently, sites like <strong>skills.sh</strong> have collected together open-sourced skills in a discoverable format, making them installable via a simple shell command, like this:</p><pre><code>npx skills add https://github.com/avdlee/swiftui-agent-skill --skill swiftui-expert-skill</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2P8X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7983c2f0-8585-4ce9-abea-424456fb84ba_1716x1016.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2P8X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7983c2f0-8585-4ce9-abea-424456fb84ba_1716x1016.png 424w, https://substackcdn.com/image/fetch/$s_!2P8X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7983c2f0-8585-4ce9-abea-424456fb84ba_1716x1016.png 848w, https://substackcdn.com/image/fetch/$s_!2P8X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7983c2f0-8585-4ce9-abea-424456fb84ba_1716x1016.png 1272w, https://substackcdn.com/image/fetch/$s_!2P8X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7983c2f0-8585-4ce9-abea-424456fb84ba_1716x1016.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2P8X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7983c2f0-8585-4ce9-abea-424456fb84ba_1716x1016.png" width="1456" height="862" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7983c2f0-8585-4ce9-abea-424456fb84ba_1716x1016.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:862,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:113128,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7983c2f0-8585-4ce9-abea-424456fb84ba_1716x1016.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2P8X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7983c2f0-8585-4ce9-abea-424456fb84ba_1716x1016.png 424w, https://substackcdn.com/image/fetch/$s_!2P8X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7983c2f0-8585-4ce9-abea-424456fb84ba_1716x1016.png 848w, https://substackcdn.com/image/fetch/$s_!2P8X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7983c2f0-8585-4ce9-abea-424456fb84ba_1716x1016.png 1272w, https://substackcdn.com/image/fetch/$s_!2P8X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7983c2f0-8585-4ce9-abea-424456fb84ba_1716x1016.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://skills.sh/?q=swift">skills.sh</a></figcaption></figure></div><p>Annoyingly, Anthropic still hasn&#8217;t bothered to adopt the standard AGENTS.md and .agent/skills formats yet, but you can create a simple file-path alias inside your CLAUDE.md pointing at the main file as a source of truth. </p><div><hr></div><h4>Teleporting Sessions to the Web</h4><p>Claude Code and Codex live in your CLI. But they can also live in the cloud!</p><p>Paid users can connect their GitHub repos to their web client at <a href="http://claude.ai/code">claude.ai/code</a> or <a href="http://chatgpt.com/codex">chatgpt.com/codex</a> to get that lovely agentic goodness on-the-go</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LHzQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc52cd7e6-d31c-4615-8d33-7c5f10f1bf72_1970x816.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LHzQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc52cd7e6-d31c-4615-8d33-7c5f10f1bf72_1970x816.png 424w, https://substackcdn.com/image/fetch/$s_!LHzQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc52cd7e6-d31c-4615-8d33-7c5f10f1bf72_1970x816.png 848w, https://substackcdn.com/image/fetch/$s_!LHzQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc52cd7e6-d31c-4615-8d33-7c5f10f1bf72_1970x816.png 1272w, https://substackcdn.com/image/fetch/$s_!LHzQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc52cd7e6-d31c-4615-8d33-7c5f10f1bf72_1970x816.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LHzQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc52cd7e6-d31c-4615-8d33-7c5f10f1bf72_1970x816.png" width="1456" height="603" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c52cd7e6-d31c-4615-8d33-7c5f10f1bf72_1970x816.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:603,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:110180,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc52cd7e6-d31c-4615-8d33-7c5f10f1bf72_1970x816.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LHzQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc52cd7e6-d31c-4615-8d33-7c5f10f1bf72_1970x816.png 424w, https://substackcdn.com/image/fetch/$s_!LHzQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc52cd7e6-d31c-4615-8d33-7c5f10f1bf72_1970x816.png 848w, https://substackcdn.com/image/fetch/$s_!LHzQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc52cd7e6-d31c-4615-8d33-7c5f10f1bf72_1970x816.png 1272w, https://substackcdn.com/image/fetch/$s_!LHzQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc52cd7e6-d31c-4615-8d33-7c5f10f1bf72_1970x816.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The win here isn&#8217;t immediately obvious.</p><p>But consider the workflow it unlocks:</p><ul><li><p>Set up your team, <strong>including non-technical</strong>, with Claude Code or Codex.</p></li><li><p>They find a bug and report it directly in a Codex session via the iOS app.</p></li><li><p>An agent could potentially <strong>diagnose</strong> the issue, <strong>fix</strong> it, and create a <strong>PR</strong>.</p></li></ul><p>Claude Code goes one step further: the <a href="https://code.claude.com/docs/en/claude-code-on-the-web">teleport</a> command enables you to jump a running CLI session to a web session. This is useful if you wanted to keep track of your agents at the work do, on the loo, or perhaps on a date with your boo.</p><div><hr></div><h4>Tab Completion</h4><p>Cursor is arguably the most successful AI application out there, allowing devs to pick between GPT-5.2 and Opus 4.5 models in a VS-Code-forked IDE.</p><p>But I kind of always felt iffy about it.</p><p>But when I tried it in early/mid 2025, it was objectively quite sh*t. </p><p>It was useless at gathering context across more than a trivially small codebase, and felt like it throttled, or perhaps lobotomised, the underlying models to squeeze them into a $20/mo subscription fee. </p><p>But I need to revisit it at some point, because people say it&#8217;s the gold standard for manually programming these days.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;9e8fda70-2a4f-4db1-9a2b-3d7915f3793b&quot;,&quot;duration&quot;:null}"></div><p>The <em>Tab Completion</em> workflow is considered both fast and accurate, often suggesting what you need. Just tap Tab to accept.</p><div><hr></div><h4>The Ralph Loop</h4><p>Ralph, and yes it&#8217;s named specifically after Ralph Wiggum, is a <a href="https://github.com/frankbria/ralph-claude-code">plugin</a> for getting your agent to continuously work until it&#8217;s actually finished.</p><p>When Claude Code finishes working on a task, the plugin stops it from completing, and re-sends the original prompt. It forces the agent to run in a loop until it converges on an optimal output. </p><p>The core idea is that a good prompt and multiple iterations on the same code tend to produce better results than one-shotting, as long as Claude Code can verify its work via tests or builds. The plugin itself automates this process, while also helping stop the loop from accidentally eating through all your credits.</p><p>I don&#8217;t have a dog in this fight, but <a href="https://x.com/steipete/status/2011886384102195265">some people reckon</a> that using a plugin to force Claude Code to verify its work is unnecessary when Codex can get it right first time.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HTtM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219115c5-9a93-47f6-8987-964832d85e2e_803x500.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HTtM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219115c5-9a93-47f6-8987-964832d85e2e_803x500.jpeg 424w, https://substackcdn.com/image/fetch/$s_!HTtM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219115c5-9a93-47f6-8987-964832d85e2e_803x500.jpeg 848w, https://substackcdn.com/image/fetch/$s_!HTtM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219115c5-9a93-47f6-8987-964832d85e2e_803x500.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!HTtM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219115c5-9a93-47f6-8987-964832d85e2e_803x500.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HTtM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219115c5-9a93-47f6-8987-964832d85e2e_803x500.jpeg" width="803" height="500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/219115c5-9a93-47f6-8987-964832d85e2e_803x500.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:803,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:88976,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219115c5-9a93-47f6-8987-964832d85e2e_803x500.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HTtM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219115c5-9a93-47f6-8987-964832d85e2e_803x500.jpeg 424w, https://substackcdn.com/image/fetch/$s_!HTtM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219115c5-9a93-47f6-8987-964832d85e2e_803x500.jpeg 848w, https://substackcdn.com/image/fetch/$s_!HTtM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219115c5-9a93-47f6-8987-964832d85e2e_803x500.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!HTtM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F219115c5-9a93-47f6-8987-964832d85e2e_803x500.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h4><a href="https://blog.jacobstechtavern.com/i/185165895/openclaw-aka-clawdbot">OpenClaw (aka Clawdbot)</a></h4><p>A recent project by the legendary <a href="https://x.com/steipete">Peter Steinberger</a> took the internet by storm early this year. But, frankly, it took me a very long time to understand what it was.</p><p>In short (I&#8217;m criminally underexplaining here), it&#8217;s Claude + Memory + Texting. It links to messaging apps like WhatsApp or Telegram, and allows you to chat to the agent while on a date with your wife. Finally.</p><p>People have bought Mac Minis specifically for this <em>(you can just as easily get a <a href="https://www.hetzner.com/dedicated-rootserver?mtm_campaign=18515490449&amp;mtm_source=google&amp;mtm_keyword=hetzner&amp;mtm_medium=Brand_Search&amp;mtm_content=626298411305&amp;gad_source=1&amp;gad_campaignid=18515490449&amp;gbraid=0AAAAADoOjTUvV7pDvWfQmhVBxTqfMMN-r&amp;gclid=Cj0KCQiA-YvMBhDtARIsAHZuUzJkQn3cgFsCtD7p6P_mr4hSRg8KTuxUQztkcusNTffVbPy1PFKEEiAaAqFDEALw_wcB">Hetzner box</a> but that&#8217;s no fun) </em>and, to listen to them, <a href="https://x.com/AlexFinn/status/2017305997212323887">found God</a> <em>(or at least AGI)</em>. Someone claimed their agent paid for a phone number from Twilio, connected to the ChatGPT voice API, and rang the user.</p><p>It&#8217;s probably little ill-advised to give your credit card details to a robot, but it&#8217;s hella cool.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vtVi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F328c2d0a-da44-4ec4-b9ab-1b4c92faff8b_1872x1616.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vtVi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F328c2d0a-da44-4ec4-b9ab-1b4c92faff8b_1872x1616.png 424w, https://substackcdn.com/image/fetch/$s_!vtVi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F328c2d0a-da44-4ec4-b9ab-1b4c92faff8b_1872x1616.png 848w, https://substackcdn.com/image/fetch/$s_!vtVi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F328c2d0a-da44-4ec4-b9ab-1b4c92faff8b_1872x1616.png 1272w, https://substackcdn.com/image/fetch/$s_!vtVi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F328c2d0a-da44-4ec4-b9ab-1b4c92faff8b_1872x1616.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vtVi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F328c2d0a-da44-4ec4-b9ab-1b4c92faff8b_1872x1616.png" width="1456" height="1257" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/328c2d0a-da44-4ec4-b9ab-1b4c92faff8b_1872x1616.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1257,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:931100,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F328c2d0a-da44-4ec4-b9ab-1b4c92faff8b_1872x1616.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vtVi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F328c2d0a-da44-4ec4-b9ab-1b4c92faff8b_1872x1616.png 424w, https://substackcdn.com/image/fetch/$s_!vtVi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F328c2d0a-da44-4ec4-b9ab-1b4c92faff8b_1872x1616.png 848w, https://substackcdn.com/image/fetch/$s_!vtVi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F328c2d0a-da44-4ec4-b9ab-1b4c92faff8b_1872x1616.png 1272w, https://substackcdn.com/image/fetch/$s_!vtVi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F328c2d0a-da44-4ec4-b9ab-1b4c92faff8b_1872x1616.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://openclaw.ai">OpenClaw</a></figcaption></figure></div><div><hr></div><h2>Cargo-Culting the Creator of Claude Code</h2><p>The first cargo cult originated in world war 2. Pacific tribes saw planes stocked with supplies and food landing, and began ritualistically imitating allied military practices in the hope of getting more planes to come with more supplies.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Vax-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda428d84-ade6-4362-bc04-e2e12fc42d2a_1024x776.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Vax-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda428d84-ade6-4362-bc04-e2e12fc42d2a_1024x776.webp 424w, https://substackcdn.com/image/fetch/$s_!Vax-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda428d84-ade6-4362-bc04-e2e12fc42d2a_1024x776.webp 848w, https://substackcdn.com/image/fetch/$s_!Vax-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda428d84-ade6-4362-bc04-e2e12fc42d2a_1024x776.webp 1272w, https://substackcdn.com/image/fetch/$s_!Vax-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda428d84-ade6-4362-bc04-e2e12fc42d2a_1024x776.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Vax-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda428d84-ade6-4362-bc04-e2e12fc42d2a_1024x776.webp" width="1024" height="776" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/da428d84-ade6-4362-bc04-e2e12fc42d2a_1024x776.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:776,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:103272,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda428d84-ade6-4362-bc04-e2e12fc42d2a_1024x776.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Vax-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda428d84-ade6-4362-bc04-e2e12fc42d2a_1024x776.webp 424w, https://substackcdn.com/image/fetch/$s_!Vax-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda428d84-ade6-4362-bc04-e2e12fc42d2a_1024x776.webp 848w, https://substackcdn.com/image/fetch/$s_!Vax-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda428d84-ade6-4362-bc04-e2e12fc42d2a_1024x776.webp 1272w, https://substackcdn.com/image/fetch/$s_!Vax-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda428d84-ade6-4362-bc04-e2e12fc42d2a_1024x776.webp 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image source had no credit</figcaption></figure></div><p>&#8220;Cargo cult&#8221; is also my favourite metaphor in tech. It describes the classic fallacy:</p><blockquote><p><em>If we copy what big tech companies do, we will become a big tech company.</em></p></blockquote><p>Developers <em>love</em> introducing complexity, and need to be constantly hit to prevent them from introducing custom build systems, proprietary UI frameworks, and re-architecting to VIPER. Solutions designed for problems <em>&#8220;at scale&#8221;</em>, meaning tens of millions of users, and <em>not</em> a team of 3 devs in a basement.</p><p>But, sometimes, it can be handy to find out what the big boys are doing so we can cosplay. </p><p>So I&#8217;m going to replicate Boris Cherny&#8217;s Claude Code workflow. Along with some of the new techniques we learned about earlier. </p><div class="twitter-embed" data-attrs="{&quot;url&quot;:&quot;https://x.com/bcherny/status/2007179832300581177&quot;,&quot;full_text&quot;:&quot;I'm Boris and I created Claude Code. Lots of people have asked how I use Claude Code, so I wanted to show off my setup a bit.\n\nMy setup might be surprisingly vanilla! Claude Code works great out of the box, so I personally don't customize it much. There is no one correct way to&quot;,&quot;username&quot;:&quot;bcherny&quot;,&quot;name&quot;:&quot;Boris Cherny&quot;,&quot;profile_image_url&quot;:&quot;https://pbs.substack.com/profile_images/1902044548936953856/J2jeik0t_normal.jpg&quot;,&quot;date&quot;:&quot;2026-01-02T19:58:58.000Z&quot;,&quot;photos&quot;:[],&quot;quoted_tweet&quot;:{},&quot;reply_count&quot;:1253,&quot;retweet_count&quot;:6652,&quot;like_count&quot;:52129,&quot;impression_count&quot;:7523425,&quot;expanded_url&quot;:null,&quot;video_url&quot;:null,&quot;belowTheFold&quot;:true}" data-component-name="Twitter2ToDOM"></div><p>What is he doing? </p><ol><li><p>Running 5 Claude Code instances in parallel on the terminal </p></li><li><p>Regularly <a href="https://arach.io/til/claude-code-teleport-sessions/">teleporting to sandboxed web sessions</a> for background processing </p></li><li><p>Sticking religiously to the slowest, smartest thinking model</p></li><li><p>Maintaining a single, big, shared, CLAUDE.md in the repo </p></li><li><p>Using Github Actions to update CLAUDE.md as part of PRs </p></li><li><p>Starting sessions in plan mode, refining, then one-shotting </p></li><li><p>Creating <a href="https://code.claude.com/docs/en/slash-commands#bash-command-execution">slash commands</a> for commonly-used workflows, e.g. commits </p></li><li><p>Using a few <a href="https://code.claude.com/docs/en/sub-agents">subagents</a> for specific workflows, e.g. verification or simplifying </p></li><li><p>Using a PostToolUse hook to run linting on generated code </p></li><li><p>Avoid --dangerously-skip-permisisons, but allow permissions in settings.json</p></li><li><p>Configure MCP to interface with tools like Slack and SQL using mcp.json</p></li><li><p>For long-running tasks, ensure Claude verifies its work in the background </p></li><li><p>Solid verification is critical: tests, iOS simulator runs, or bash scripts</p></li></ol><p>Alright, let&#8217;s put this cargo-cult to the test, and build the one that got away: <strong>Maxwell</strong>.</p><div><hr></div><p>Oh, and he actually tweeted again recently. Things do move fast.</p><div class="twitter-embed" data-attrs="{&quot;url&quot;:&quot;https://x.com/bcherny/status/2017742741636321619?s=46&quot;,&quot;full_text&quot;:&quot;I'm Boris and I created Claude Code. I wanted to quickly share a few tips for using Claude Code, sourced directly from the Claude Code team. The way the team uses Claude is different than how I use it. Remember: there is no one right way to use Claude Code -- everyones' setup is&quot;,&quot;username&quot;:&quot;bcherny&quot;,&quot;name&quot;:&quot;Boris Cherny&quot;,&quot;profile_image_url&quot;:&quot;https://pbs.substack.com/profile_images/1902044548936953856/J2jeik0t_normal.jpg&quot;,&quot;date&quot;:&quot;2026-01-31T23:32:12.000Z&quot;,&quot;photos&quot;:[],&quot;quoted_tweet&quot;:{},&quot;reply_count&quot;:850,&quot;retweet_count&quot;:5552,&quot;like_count&quot;:49029,&quot;impression_count&quot;:8146822,&quot;expanded_url&quot;:null,&quot;video_url&quot;:null,&quot;belowTheFold&quot;:true}" data-component-name="Twitter2ToDOM"></div><p>What now? </p><ol><li><p>Use worktrees (or just multiple git checkouts) to run agents in parallel</p></li><li><p>Always start with a plan, then get another agent to review the plan <em>(personally I like to pit Claude Code against Codex!)</em></p></li><li><p>Ensure your AGENTS.md/CLAUDE.md is updated every time an agent makes a mistake </p></li><li><p>Create skills regularly and commit them to git, especially common daily tasks </p></li><li><p>Use Slack MCP to directly tell @Claude/@Codex to fix a bug and make a PR </p></li><li><p>Utilise these pro prompts:</p><ol><li><p>Ask the agent to grill you on changes so you understand</p></li><li><p>After a mediocre fix, tell it to scrap the change and re-implement </p></li><li><p>Write detailed specs with minimal ambiguity before handing off work</p></li></ol></li><li><p>Customise your terminal and utilise voice dictation (WisprFlow is best!)</p></li><li><p>Subagents can be useful to get more compute or preserve your context window </p></li><li><p>Agents can connect to analytics and databases to answer questions </p></li><li><p>You can have the agent explain the &#8220;why&#8221; behind the changes, and even present visual diagrams explaining your codebase. </p></li></ol><div><hr></div><h2>Building Maxwell in an afternoon</h2><p>Maxwell was conceived as part of a team building exercise, where we pitched a novel business idea. After discarding my original idea of anti-covid-branded hand sanitiser, I pivoted. </p><p>I&#8217;d just moved into my first home, and experienced the annoying hassle of lightbulb management for the first time. Lights are everywhere, bulbs fail intermittently, and there are dozens of fittings, styles, and colour temperatures you need to understand if you want to replace them.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1Wwk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da7ccd0-00e0-4c84-a6ae-8a2258d97755_600x480.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1Wwk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da7ccd0-00e0-4c84-a6ae-8a2258d97755_600x480.webp 424w, https://substackcdn.com/image/fetch/$s_!1Wwk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da7ccd0-00e0-4c84-a6ae-8a2258d97755_600x480.webp 848w, https://substackcdn.com/image/fetch/$s_!1Wwk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da7ccd0-00e0-4c84-a6ae-8a2258d97755_600x480.webp 1272w, https://substackcdn.com/image/fetch/$s_!1Wwk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da7ccd0-00e0-4c84-a6ae-8a2258d97755_600x480.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1Wwk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da7ccd0-00e0-4c84-a6ae-8a2258d97755_600x480.webp" width="600" height="480" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1da7ccd0-00e0-4c84-a6ae-8a2258d97755_600x480.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:480,&quot;width&quot;:600,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:66012,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da7ccd0-00e0-4c84-a6ae-8a2258d97755_600x480.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1Wwk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da7ccd0-00e0-4c84-a6ae-8a2258d97755_600x480.webp 424w, https://substackcdn.com/image/fetch/$s_!1Wwk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da7ccd0-00e0-4c84-a6ae-8a2258d97755_600x480.webp 848w, https://substackcdn.com/image/fetch/$s_!1Wwk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da7ccd0-00e0-4c84-a6ae-8a2258d97755_600x480.webp 1272w, https://substackcdn.com/image/fetch/$s_!1Wwk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1da7ccd0-00e0-4c84-a6ae-8a2258d97755_600x480.webp 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Diagram from <a href="https://hirosarts.com/blog/common-lamp-holder-types/?srsltid=AfmBOoraojXT6OMs3zsJGIc3A5np5KdgOHkRSq773BG8fmI8JUX55mo-">Hirostart</a></figcaption></figure></div><p>Maxwell was born.</p><p>Map out the lightbulbs in your home. Track what needs replacing. And automatically replenish them. </p><p>24-year-old Jacob never got this off the ground, because in a shocking evolution of his maturity, he actually tried to verify the business side before building anything. </p><p>Unfortunately, this verification didn&#8217;t get much further than an email to B&amp;Q customer support and an InMail to their CEO. <em>He tried.</em> </p><p>Because he wasn&#8217;t able to get the drop-shipping side to work, he put the project on the permanent backburner. </p><p>Until now.</p><p>Er, hold on.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mho5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4faf5932-34bb-4946-939e-092f6f5b8b60_1914x530.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mho5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4faf5932-34bb-4946-939e-092f6f5b8b60_1914x530.png 424w, https://substackcdn.com/image/fetch/$s_!mho5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4faf5932-34bb-4946-939e-092f6f5b8b60_1914x530.png 848w, https://substackcdn.com/image/fetch/$s_!mho5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4faf5932-34bb-4946-939e-092f6f5b8b60_1914x530.png 1272w, https://substackcdn.com/image/fetch/$s_!mho5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4faf5932-34bb-4946-939e-092f6f5b8b60_1914x530.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mho5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4faf5932-34bb-4946-939e-092f6f5b8b60_1914x530.png" width="1456" height="403" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4faf5932-34bb-4946-939e-092f6f5b8b60_1914x530.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:403,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:125391,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4faf5932-34bb-4946-939e-092f6f5b8b60_1914x530.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mho5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4faf5932-34bb-4946-939e-092f6f5b8b60_1914x530.png 424w, https://substackcdn.com/image/fetch/$s_!mho5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4faf5932-34bb-4946-939e-092f6f5b8b60_1914x530.png 848w, https://substackcdn.com/image/fetch/$s_!mho5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4faf5932-34bb-4946-939e-092f6f5b8b60_1914x530.png 1272w, https://substackcdn.com/image/fetch/$s_!mho5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4faf5932-34bb-4946-939e-092f6f5b8b60_1914x530.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Okay, disregard what I said, I totally tried to build it back in 2020.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jThW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f185511-91d6-4d40-9981-a9cd159f4f91_2592x1340.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jThW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f185511-91d6-4d40-9981-a9cd159f4f91_2592x1340.png 424w, https://substackcdn.com/image/fetch/$s_!jThW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f185511-91d6-4d40-9981-a9cd159f4f91_2592x1340.png 848w, https://substackcdn.com/image/fetch/$s_!jThW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f185511-91d6-4d40-9981-a9cd159f4f91_2592x1340.png 1272w, https://substackcdn.com/image/fetch/$s_!jThW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f185511-91d6-4d40-9981-a9cd159f4f91_2592x1340.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jThW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f185511-91d6-4d40-9981-a9cd159f4f91_2592x1340.png" width="1456" height="753" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8f185511-91d6-4d40-9981-a9cd159f4f91_2592x1340.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:753,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:425332,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f185511-91d6-4d40-9981-a9cd159f4f91_2592x1340.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jThW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f185511-91d6-4d40-9981-a9cd159f4f91_2592x1340.png 424w, https://substackcdn.com/image/fetch/$s_!jThW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f185511-91d6-4d40-9981-a9cd159f4f91_2592x1340.png 848w, https://substackcdn.com/image/fetch/$s_!jThW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f185511-91d6-4d40-9981-a9cd159f4f91_2592x1340.png 1272w, https://substackcdn.com/image/fetch/$s_!jThW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f185511-91d6-4d40-9981-a9cd159f4f91_2592x1340.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I hazily recall my quixotic quest to build a lightbulb fitting classifier ML model using CreateML. My rush to implement Stripe payments before even a hint of revenue. My zealot-like insistence on using Carthage as a dependency manager.</p><p>I also found my old logo! </p><p>The only half-valuable thing I got out of my Apple Pencil.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aisJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F553cd95a-1b6f-4e4a-ac20-5ea5c6d1579b_2680x1484.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aisJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F553cd95a-1b6f-4e4a-ac20-5ea5c6d1579b_2680x1484.png 424w, https://substackcdn.com/image/fetch/$s_!aisJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F553cd95a-1b6f-4e4a-ac20-5ea5c6d1579b_2680x1484.png 848w, https://substackcdn.com/image/fetch/$s_!aisJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F553cd95a-1b6f-4e4a-ac20-5ea5c6d1579b_2680x1484.png 1272w, https://substackcdn.com/image/fetch/$s_!aisJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F553cd95a-1b6f-4e4a-ac20-5ea5c6d1579b_2680x1484.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aisJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F553cd95a-1b6f-4e4a-ac20-5ea5c6d1579b_2680x1484.png" width="1456" height="806" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/553cd95a-1b6f-4e4a-ac20-5ea5c6d1579b_2680x1484.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:806,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1499111,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/185165895?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F553cd95a-1b6f-4e4a-ac20-5ea5c6d1579b_2680x1484.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!aisJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F553cd95a-1b6f-4e4a-ac20-5ea5c6d1579b_2680x1484.png 424w, https://substackcdn.com/image/fetch/$s_!aisJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F553cd95a-1b6f-4e4a-ac20-5ea5c6d1579b_2680x1484.png 848w, https://substackcdn.com/image/fetch/$s_!aisJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F553cd95a-1b6f-4e4a-ac20-5ea5c6d1579b_2680x1484.png 1272w, https://substackcdn.com/image/fetch/$s_!aisJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F553cd95a-1b6f-4e4a-ac20-5ea5c6d1579b_2680x1484.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I&#8217;m putting my updated workflow to the test to build out this project:</p><ul><li><p>I did all this work in Codex using the <strong>gpt-5.2-codex high</strong> model.</p></li><li><p>I set up XcodeBuildMCP with the intention of verifying all my work autonomously via tests and simulator runs.</p></li><li><p>The repo contains some open-sourced AGENTS.md, slash commands, and skills for SwiftUI and concurrency review.</p></li><li><p>I&#8217;m going to aim to run 5 instances of Codex in parallel, numbered, with each CLI window pinging me via system notification when they finish.</p></li><li><p>For each instance, I&#8217;ll carefully plan each feature before trying to one-shot.</p></li><li><p>I&#8217;m going to set up web sessions via the ChatGPT app and attempt to ship some QA fix PRs while eating dinner.</p></li><li><p>If I have time, I might install Cursor and implement some manual fixes, with my fingers, like it&#8217;s the 1970s.</p></li></ul><p>Here&#8217;s the full project!</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;15b856ea-74d9-4c2a-9625-c596fe2c3554&quot;,&quot;duration&quot;:null}"></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://github.com/jacobsapps/Maxwell&quot;,&quot;text&quot;:&quot;The sample project on GitHub&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://github.com/jacobsapps/Maxwell"><span>The sample project on GitHub</span></a></p><blockquote><p><em>Well, it&#8217;s not exactly finished, but I trust you not to PIP me. <br>Pretty good for an afternoon&#8217;s work, I reckon</em>.</p></blockquote><div><hr></div><h2><strong>Last Orders</strong></h2><p>I spent summer diving headfirst into agentic engineering using Claude Code (and later, Codex), realising they were finally very, very good.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;69727932-bb94-42e2-8bb7-7251915e3507&quot;,&quot;caption&quot;:&quot;50-100% productivity gains echoes the fantasy sold to you by grifters selling $997 AI courses on Twitter. If that&#8217;s the case, I&#8217;m missing a trick charging $12/month. Because it&#8217;s legit.&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Claude Code has made me 50-100% more productive&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:126930235,&quot;name&quot;:&quot;Jacob Bartlett&quot;,&quot;bio&quot;:&quot;Master iOS. Boost your salary. Join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week. Sign up free today!&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!s80e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feab1e065-dffc-4096-ad9e-826ddda8a6cd_1304x1304.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100}],&quot;post_date&quot;:&quot;2025-09-02T15:02:30.684Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!mGPq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38e800aa-9c34-4664-8949-b7c5af8bff70_1680x1200.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.jacobstechtavern.com/p/claude-code-productivity&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:170755884,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:16,&quot;comment_count&quot;:2,&quot;publication_id&quot;:1376173,&quot;publication_name&quot;:&quot;Jacob&#8217;s Tech Tavern&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LJp-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee402e25-4e20-4683-ba5f-20ca86eb2b43_512x512.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p>But they have not stopped in the last 6 months. I suspect I&#8217;ll have to make this a semi-regular post to ensure we stay ahead of the curve!</p><p>Frankly, while multi-agent workflows are the current razor&#8217;s edge for productivity, it&#8217;s actually a deeply suboptimal workaround to latency. If high-thinking-budget inference ran 100x faster, we would not need to perform this context-switching, and could simply roll a single agent as the fully-engaged human in the loop.</p><p>I reckon that&#8217;s where the next 6 months is going to go.</p><blockquote><p><em>If you liked my post, subscribe free to join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week.</em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h5><strong>Sponsored Link</strong></h5><h4><strong><a href="https://www.revenuecat.com/blog/engineering/paywalls-changelog/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=paywalls">RevenueCat Paywalls: Build &amp; iterate subscription flows faster</a></strong></h4><blockquote><p>RevenueCat Paywalls just added a steady stream of new features: more templates, deeper customization, better previews, and new promo tools. <a href="https://www.revenuecat.com/blog/engineering/paywalls-changelog/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=paywalls">Check the Paywalls changelog</a> and keep improving your subscription flows as new capabilities ship.</p></blockquote>]]></content:encoded></item><item><title><![CDATA[My (deeply stressful) big tech interview grind]]></title><description><![CDATA[A survival guide for the tech job market in 2026]]></description><link>https://blog.jacobstechtavern.com/p/interview-grind</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/interview-grind</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Tue, 03 Feb 2026 16:02:51 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ASyg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82226f30-8964-4fad-a246-de6fe6e4c5e6_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ASyg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82226f30-8964-4fad-a246-de6fe6e4c5e6_1680x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ASyg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82226f30-8964-4fad-a246-de6fe6e4c5e6_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!ASyg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82226f30-8964-4fad-a246-de6fe6e4c5e6_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!ASyg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82226f30-8964-4fad-a246-de6fe6e4c5e6_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!ASyg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82226f30-8964-4fad-a246-de6fe6e4c5e6_1680x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ASyg!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82226f30-8964-4fad-a246-de6fe6e4c5e6_1680x1200.png" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/82226f30-8964-4fad-a246-de6fe6e4c5e6_1680x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:4022827,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/182069552?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82226f30-8964-4fad-a246-de6fe6e4c5e6_1680x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ASyg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82226f30-8964-4fad-a246-de6fe6e4c5e6_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!ASyg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82226f30-8964-4fad-a246-de6fe6e4c5e6_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!ASyg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82226f30-8964-4fad-a246-de6fe6e4c5e6_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!ASyg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82226f30-8964-4fad-a246-de6fe6e4c5e6_1680x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>&#8220;Interview grind? Huh?</em>&#8221;, I hear you say from your screen, in the future, <em><a href="https://blog.jacobstechtavern.com/p/my-wife-gave-me-100-days">&#8220;I thought you were going independent?!&#8221;</a></em></p><p>Yeah, I thought so too. </p><p>Today&#8217;s post is one part life update, seven parts survival guide.</p><p>I&#8217;ll give a recap of where I got on my independence journey.</p><p>Next, I&#8217;ll share my experience working through 50 interviews in one month, and offer you practical advice for maximising your chances at passing each stage of the big tech interview process.</p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/182069552/my-going-indie-scorecard">My Going Indie Scorecard</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/182069552/my-job-application-journey">The job market</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/182069552/cv-optimisation">CV optimisation</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/182069552/recruiter-screening">Recruiter screening</a> </p></li><li><p><a href="https://blog.jacobstechtavern.com/i/182069552/first-technical-round">First technical round</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/182069552/take-home-test">Take-home test</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/182069552/the-panel-interview">The Panel Interview&#8482;</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/182069552/offer-and-onboarding">Offer &amp; Onboarding</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/182069552/last-orders">Last Orders</a></p></li></ul><div><hr></div><h2>My Going Indie Scorecard</h2><p>Before I tell you what&#8217;s new, let&#8217;s put together a scorecard of my 100 days as an independent creator:</p><p>My initial approach to shipping content: <strong>all bangers, all the time</strong>. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!W0yJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0a1df4-e863-4b4d-83be-aa2e8f53e167_480x270.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!W0yJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0a1df4-e863-4b4d-83be-aa2e8f53e167_480x270.gif 424w, https://substackcdn.com/image/fetch/$s_!W0yJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0a1df4-e863-4b4d-83be-aa2e8f53e167_480x270.gif 848w, https://substackcdn.com/image/fetch/$s_!W0yJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0a1df4-e863-4b4d-83be-aa2e8f53e167_480x270.gif 1272w, https://substackcdn.com/image/fetch/$s_!W0yJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0a1df4-e863-4b4d-83be-aa2e8f53e167_480x270.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!W0yJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0a1df4-e863-4b4d-83be-aa2e8f53e167_480x270.gif" width="480" height="270" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e0a1df4-e863-4b4d-83be-aa2e8f53e167_480x270.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:270,&quot;width&quot;:480,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1889673,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/182069552?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0a1df4-e863-4b4d-83be-aa2e8f53e167_480x270.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!W0yJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0a1df4-e863-4b4d-83be-aa2e8f53e167_480x270.gif 424w, https://substackcdn.com/image/fetch/$s_!W0yJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0a1df4-e863-4b4d-83be-aa2e8f53e167_480x270.gif 848w, https://substackcdn.com/image/fetch/$s_!W0yJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0a1df4-e863-4b4d-83be-aa2e8f53e167_480x270.gif 1272w, https://substackcdn.com/image/fetch/$s_!W0yJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0a1df4-e863-4b4d-83be-aa2e8f53e167_480x270.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><a href="https://blog.jacobstechtavern.com/p/swift-for-android-vs-kmp">My first month</a> of independence was <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">spent artisnally</a> crafting <a href="https://blog.jacobstechtavern.com/p/the-year-swiftui-died">each new article</a> over a full <a href="https://blog.jacobstechtavern.com/p/ios-system-design">5 working days</a>. Each one of these pieces of content was a killer, growing my paid subcount by over a dozen apiece. <strong>Content Score: A+</strong>.</p><p>Riding high, I deigned to actually do a budget. </p><p>And&#8230; f*ck.</p><p>You&#8217;d think a digital services business would have phenomenal margins, but costs like EU VAT, transaction fees, blog hosting fees, and income tax added up quickly.</p><p>Break even would be tough. Optimistically, maybe in 8 months, if my growth rate stayed at the maximum. Maybe I could do this before running out of money. But this is kind of a dumb risk when I have a wife, a mortgage, and 2 young kids. </p><p>War Stories landed me some great content, and was a brilliant excuse to connect to other prolific creators. You should definitely read my interviews if you haven&#8217;t had the chance! I will definitely continue to do more of these. </p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;5f7a594c-2a65-4bef-9f8e-e71aba0b2e30&quot;,&quot;caption&quot;:&quot;Welcome to my first edition of War Stories, where I partner with famous builders in the iOS space to share real-life stories from the frontlines as they scale their projects.&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;The Great Connection Pool Meltdown&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:126930235,&quot;name&quot;:&quot;Jacob Bartlett&quot;,&quot;bio&quot;:&quot;Master iOS. Boost your salary. Join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week. Sign up free today!&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!s80e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feab1e065-dffc-4096-ad9e-826ddda8a6cd_1304x1304.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100},{&quot;id&quot;:161471335,&quot;name&quot;:&quot;Pedro Pi&#241;era Buend&#237;a&quot;,&quot;bio&quot;:&quot;I'm a builder and an open source advocate. I'm the CEO of Tuist, a productivity platform for app developers.&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LyzR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf3ea601-3f55-43bf-a08f-066668e23640_3024x4032.jpeg&quot;,&quot;is_guest&quot;:true,&quot;bestseller_tier&quot;:null,&quot;primaryPublicationSubscribeUrl&quot;:&quot;https://thebuildersreturn.substack.com/subscribe?&quot;,&quot;primaryPublicationUrl&quot;:&quot;https://thebuildersreturn.substack.com&quot;,&quot;primaryPublicationName&quot;:&quot;The Builder's Return &quot;,&quot;primaryPublicationId&quot;:4469839}],&quot;post_date&quot;:&quot;2025-11-06T16:02:23.569Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!xR1f!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F080253fc-4caf-4713-b81f-5f8b0a90670e_1680x1200.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.jacobstechtavern.com/p/the-great-connection-pool-meltdown&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:176919776,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:16,&quot;comment_count&quot;:0,&quot;publication_id&quot;:1376173,&quot;publication_name&quot;:&quot;Jacob&#8217;s Tech Tavern&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LJp-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee402e25-4e20-4683-ba5f-20ca86eb2b43_512x512.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;b830428c-1a7d-4d1f-a7d1-c6b69fabf1b1&quot;,&quot;caption&quot;:&quot;Welcome to War Stories, where I partner with famous builders in the iOS space to share real-life stories from the frontlines. It&#8217;s part narrative, part interview, all swashbuckling fun.&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;When To Kill A Project&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:126930235,&quot;name&quot;:&quot;Jacob Bartlett&quot;,&quot;bio&quot;:&quot;Master iOS. Boost your salary. Join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week. Sign up free today!&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!s80e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feab1e065-dffc-4096-ad9e-826ddda8a6cd_1304x1304.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100}],&quot;post_date&quot;:&quot;2025-11-20T16:01:51.474Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!GVEQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feaa1e73d-ffa3-4b9b-90c1-725326ef838a_1680x1200.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.jacobstechtavern.com/p/when-to-kill-a-project&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:178878712,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:9,&quot;comment_count&quot;:3,&quot;publication_id&quot;:1376173,&quot;publication_name&quot;:&quot;Jacob&#8217;s Tech Tavern&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LJp-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee402e25-4e20-4683-ba5f-20ca86eb2b43_512x512.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p>My Creator Spotlights collab with <a href="https://weekly.fatbobman.com">fatbobman</a> also went ahead, and netted some nice cross-pollination with our mutual readership of iOS devs. </p><p>These collaborations produced some solid content, and allowed me to share some very fun war stories. My strategy, however, was about growing my free subscriber base significantly, and unfortunately I was not able to move the needle enough for this to bootstrap my independence. <strong>Collaboration Score: B-</strong>.</p><p>My experiment with paid acquisition was a big success in terms of scaling my readership, with my cost-per-acquisition down to (something like) $2 per inorganic free subscriber. These have translated into exactly zero paid subscribers (since I fixed my UTM tags last month). <strong>Paid Acquisition Score: C.</strong> </p><p>Tavern Tools&#8482;, my beautiful vision for a dev tools suite, was aborted before I began. I realised it was a giant distraction from growing my free base. My paid conversion rate was already sitting pretty at over 5%, so I didn&#8217;t need to create extra incentives here. <strong>DevTools Score: D for &#8220;dunno&#8221;, as I never showed up to the exam</strong>.</p><p>One bright spot in my scorecard was netting a sponsorship deal (perhaps more? Watch this space!) to advertise on my blog with my friends at <a href="https://www.revenuecat.com">RevenueCat</a>. However, it turns out that in the incredibly mature world of dev tools marketing, budgets can be tight for a new entrant. <strong>Sponsorship Score: B+</strong>.</p><p><strong>Overall Grade: B</strong>. Must try harder.</p><p>In the crushing wake of my budget, I realised what I had to do. I had to find my white whale. And what is an employer, if not just one <em>really big</em> paid subscriber? </p><div><hr></div><h2>My Job Application Journey </h2><p>Thus began my first foray into job applications since 2015.</p><p>My previous 3 job moves were through recruiters, and I&#8217;ve never had the luxury of treating the application process as a full-time job before.</p><p>The grind I underwent in December has given me insight into the state of the market, and finally given me the space to <em>properly</em> get ready for the tough interview loops that big tech companies apply to candidates.</p><p>Here&#8217;s my full stats: 26 applications. 2 offers.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!p4j3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4f4bfe1-5a7c-44a1-9e4c-14cede9dd640_1578x567.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!p4j3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4f4bfe1-5a7c-44a1-9e4c-14cede9dd640_1578x567.png 424w, https://substackcdn.com/image/fetch/$s_!p4j3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4f4bfe1-5a7c-44a1-9e4c-14cede9dd640_1578x567.png 848w, https://substackcdn.com/image/fetch/$s_!p4j3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4f4bfe1-5a7c-44a1-9e4c-14cede9dd640_1578x567.png 1272w, https://substackcdn.com/image/fetch/$s_!p4j3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4f4bfe1-5a7c-44a1-9e4c-14cede9dd640_1578x567.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!p4j3!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4f4bfe1-5a7c-44a1-9e4c-14cede9dd640_1578x567.png" width="1200" height="431.04395604395603" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f4f4bfe1-5a7c-44a1-9e4c-14cede9dd640_1578x567.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:523,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:110727,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/182069552?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4f4bfe1-5a7c-44a1-9e4c-14cede9dd640_1578x567.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!p4j3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4f4bfe1-5a7c-44a1-9e4c-14cede9dd640_1578x567.png 424w, https://substackcdn.com/image/fetch/$s_!p4j3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4f4bfe1-5a7c-44a1-9e4c-14cede9dd640_1578x567.png 848w, https://substackcdn.com/image/fetch/$s_!p4j3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4f4bfe1-5a7c-44a1-9e4c-14cede9dd640_1578x567.png 1272w, https://substackcdn.com/image/fetch/$s_!p4j3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4f4bfe1-5a7c-44a1-9e4c-14cede9dd640_1578x567.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">My job application stats in 2025</figcaption></figure></div><p>For my kings and queens who write native iOS for a living: the market isn&#8217;t as bad as the startup winter of 2022. <strong>It&#8217;s healthy</strong>. There are a ton of well-capitalised AI startups hiring native iOS engineers, despite <a href="https://newsletter.pragmaticengineer.com/p/native-vs-cross-platform">the narrative that cross-platform is eating our lunch</a>. There are a lot of established companies growing their teams too.</p><p>That said, unless you live in an American city, there are not many FAANG jobs to go around. In London, the only &#8220;big&#8221; big tech co&#8217;s hiring for iOS at the end of 2025 were Snap <em>(I got to the panel)</em> and Meta <em>(who ghosted me)</em>. </p><p>I&#8217;m kind of in a privileged position. I know the average engineer (who doesn&#8217;t run a popular blog) isn&#8217;t getting a &gt;50% hit rate on the CV screening. But I can share a lot of useful knowledge from my interview grind that can help you out with every step of the process.</p><blockquote><p><em>Upgrade to unlock this article, plus much more:</em></p><p><em>&#127775; Access <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, my exclusive advanced content <br>&#128640; Read <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> a month before anyone else <br>&#129525; Master concurrency with my <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course">full course</a> and <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced training</a></em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div>
      <p>
          <a href="https://blog.jacobstechtavern.com/p/interview-grind">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Xcode Organizer: Your Performance Cheat Sheet]]></title><description><![CDATA[Instruments, but crowdsourced]]></description><link>https://blog.jacobstechtavern.com/p/xcode-organiser</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/xcode-organiser</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Tue, 20 Jan 2026 16:01:22 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!-l4i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a0641a-ea68-4042-a74b-ee9acf4374cf_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-l4i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a0641a-ea68-4042-a74b-ee9acf4374cf_1680x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-l4i!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a0641a-ea68-4042-a74b-ee9acf4374cf_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!-l4i!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a0641a-ea68-4042-a74b-ee9acf4374cf_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!-l4i!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a0641a-ea68-4042-a74b-ee9acf4374cf_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!-l4i!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a0641a-ea68-4042-a74b-ee9acf4374cf_1680x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-l4i!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a0641a-ea68-4042-a74b-ee9acf4374cf_1680x1200.png" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/05a0641a-ea68-4042-a74b-ee9acf4374cf_1680x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:989047,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/162635177?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a0641a-ea68-4042-a74b-ee9acf4374cf_1680x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-l4i!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a0641a-ea68-4042-a74b-ee9acf4374cf_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!-l4i!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a0641a-ea68-4042-a74b-ee9acf4374cf_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!-l4i!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a0641a-ea68-4042-a74b-ee9acf4374cf_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!-l4i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a0641a-ea68-4042-a74b-ee9acf4374cf_1680x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I love working on app performance.</p><p>It just sounds cool. Performance. <em>Performance</em>. </p><p>While the bozos on feature teams are busy building stuff that actually brings in paying customers, platform engineers can feel smugly superior, typing away from our windowless basements, reducing launch time by 0.01 seconds. <em>For everyone!</em></p><p>Unfortunately, if you don&#8217;t have a full-time platform team, &#8220;performance work&#8221; is generally treated the same as &#8220;tech debt tickets&#8221;.</p><p>Despite what app release notes will have you believe, no one&#8217;s going to give us time to work on performance optimisations, because a lot of the time it&#8217;s invisible. Everyone agrees that <em>high performance</em> is desirable, but it&#8217;s virtually impossible to quantify the impact of marginal improvements.</p><p>So how does this ever get done? And how do we stay on top of it? </p><p>There is a way. And if you can master the technique, it&#8217;s also a pretty good way to get promoted. </p><p><strong>Be the dev that keeps a close eye on the Xcode Organizer. </strong></p><p>There&#8217;s nothing better for your promo packet <em>(and, for my indie readers, your own customers)</em> than identifying low-hanging fruit, recent regressions, or serious performance bottlenecks; crafting a proposal to solve them; and allotting engineering time to solve it.</p><p>This is not theoretical; this is pretty much my standard playbook. </p><p>I&#8217;ll keep a watchful eye on the Xcode Organizer. I&#8217;ll flag to Product or Engineering leadership whenever I spot an opportunity to improve something that users will actually notice: Launch time, scroll hitches, terminations, battery usage, storage usage. All these issues often have fairly trivial root causes, and offer an outsized user impact once you solve them.</p><p>Xcode Organizer is easily where 80% of my performance optimisation work originates. If you&#8217;re on top of it, you can usually pre-empt user complaints. </p><div><hr></div><blockquote><h5>Sponsored Link</h5><p><em>Substack, which powers my newsletter, is hiring iOS engineers!</em></p><p><em>The team is small, close-knit, and provides ample opportunities for mentorship, growth, ownership, and autonomy. You can apply for either the <a href="https://jobs.ashbyhq.com/substack/1b9b2f85-c54a-4cef-b5fc-e227bb30e3cc?utm_source=rMaLyl12Jp">growth team</a> or the <a href="https://jobs.ashbyhq.com/substack/695a7649-99a2-4b00-93e2-4078d2730a19?utm_source=rMaLyl12Jp">enterprise team</a>. Check out <a href="https://substack.com/jobs?utm_source=rMaLyl12Jp">their jobs page</a> for the full list of technical and non-technical openings.</em></p></blockquote><div><hr></div><h2>The Xcode Organizer</h2><p>We can find the Organizer in Xcode&#8217;s Window menu. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RpsC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a38e040-43a7-438c-9b2e-dbc656f17f43_1856x1162.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RpsC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a38e040-43a7-438c-9b2e-dbc656f17f43_1856x1162.png 424w, https://substackcdn.com/image/fetch/$s_!RpsC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a38e040-43a7-438c-9b2e-dbc656f17f43_1856x1162.png 848w, https://substackcdn.com/image/fetch/$s_!RpsC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a38e040-43a7-438c-9b2e-dbc656f17f43_1856x1162.png 1272w, https://substackcdn.com/image/fetch/$s_!RpsC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a38e040-43a7-438c-9b2e-dbc656f17f43_1856x1162.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RpsC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a38e040-43a7-438c-9b2e-dbc656f17f43_1856x1162.png" width="1456" height="912" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3a38e040-43a7-438c-9b2e-dbc656f17f43_1856x1162.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:912,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2087131,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/162635177?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a38e040-43a7-438c-9b2e-dbc656f17f43_1856x1162.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!RpsC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a38e040-43a7-438c-9b2e-dbc656f17f43_1856x1162.png 424w, https://substackcdn.com/image/fetch/$s_!RpsC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a38e040-43a7-438c-9b2e-dbc656f17f43_1856x1162.png 848w, https://substackcdn.com/image/fetch/$s_!RpsC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a38e040-43a7-438c-9b2e-dbc656f17f43_1856x1162.png 1272w, https://substackcdn.com/image/fetch/$s_!RpsC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a38e040-43a7-438c-9b2e-dbc656f17f43_1856x1162.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Even if you&#8217;ve never touched the performance charts, you&#8217;re likely already acquainted with the Organizer, since it&#8217;s where all your Archives live.</p><p>If you&#8217;ve been in the indie game for a while, you&#8217;ll also experience a nostalgia tour of everything you&#8217;ve ever submitted to the App Store.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gLOG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76eecd4a-3d54-4eab-a4fa-296e18e435ab_2058x1358.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gLOG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76eecd4a-3d54-4eab-a4fa-296e18e435ab_2058x1358.png 424w, https://substackcdn.com/image/fetch/$s_!gLOG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76eecd4a-3d54-4eab-a4fa-296e18e435ab_2058x1358.png 848w, https://substackcdn.com/image/fetch/$s_!gLOG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76eecd4a-3d54-4eab-a4fa-296e18e435ab_2058x1358.png 1272w, https://substackcdn.com/image/fetch/$s_!gLOG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76eecd4a-3d54-4eab-a4fa-296e18e435ab_2058x1358.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gLOG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76eecd4a-3d54-4eab-a4fa-296e18e435ab_2058x1358.png" width="1456" height="961" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/76eecd4a-3d54-4eab-a4fa-296e18e435ab_2058x1358.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:961,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:843207,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/162635177?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76eecd4a-3d54-4eab-a4fa-296e18e435ab_2058x1358.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!gLOG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76eecd4a-3d54-4eab-a4fa-296e18e435ab_2058x1358.png 424w, https://substackcdn.com/image/fetch/$s_!gLOG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76eecd4a-3d54-4eab-a4fa-296e18e435ab_2058x1358.png 848w, https://substackcdn.com/image/fetch/$s_!gLOG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76eecd4a-3d54-4eab-a4fa-296e18e435ab_2058x1358.png 1272w, https://substackcdn.com/image/fetch/$s_!gLOG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76eecd4a-3d54-4eab-a4fa-296e18e435ab_2058x1358.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Oh dear. </p><p>I just realised; none of my apps have enough users to actually display any data here. </p><p>Stand by. </p><blockquote><p><em>&#9742;&#65039; Thomas, help me out please! &#128225; </em></p></blockquote><p>Famous Twitter personality and iOS engineer <a href="https://x.com/Dimillian">Thomas Ricouard</a> generously took the time to share the performance stats of his indie app, <a href="https://apps.apple.com/gb/app/ice-cubes-for-mastodon/id6444915884 Ice Cubes for Mastodon">Ice Cubes for Mastodon</a>. Please show your appreciation by downloading it, either if you&#8217;re a Fediverse fanatic or even if you&#8217;re merely toot-curious.</p><blockquote><p><em>Thomas also posted a really good piece recently on <strong><a href="https://dimillian.medium.com/the-state-of-agentic-ios-engineering-in-2026-c5f0cbaa7b34">The State of Agentic iOS Engineering </a></strong><a href="https://dimillian.medium.com/the-state-of-agentic-ios-engineering-in-2026-c5f0cbaa7b34">in 2026</a>, which I massively recommend both if you&#8217;re new to agentic engineering or you&#8217;re already a Claudepilled Codex-cel</em>.</p></blockquote><div><hr></div><p>You can get very specific when you look through the organizer. You can slice most of the reports by time, by device, and by version.</p><p>There are usually tons of low-hanging performance optimisation fruit at the top level, but if you have enough users, you can often spot OS-version, device, or version corner cases by narrowing things down. </p><p>Many performance attributes in the Organizer have both metrics and reports to investigate. Metrics are aggregated numbers sliced across all your users and versions, and reports surface individual code-level issues. </p><p>I think of the Xcode Organizer like the top of the performance funnel. You get fully aggregated metrics across your whole user-base. When you spot a problem, you can often go deeper with Instruments. Once you identify the bottleneck, you can then solve it in code and verify the improvement.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!59vu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49227ba4-8a5d-4c2b-9e82-2a08a8da88da_1570x1174.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!59vu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49227ba4-8a5d-4c2b-9e82-2a08a8da88da_1570x1174.png 424w, https://substackcdn.com/image/fetch/$s_!59vu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49227ba4-8a5d-4c2b-9e82-2a08a8da88da_1570x1174.png 848w, https://substackcdn.com/image/fetch/$s_!59vu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49227ba4-8a5d-4c2b-9e82-2a08a8da88da_1570x1174.png 1272w, https://substackcdn.com/image/fetch/$s_!59vu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49227ba4-8a5d-4c2b-9e82-2a08a8da88da_1570x1174.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!59vu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49227ba4-8a5d-4c2b-9e82-2a08a8da88da_1570x1174.png" width="1456" height="1089" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/49227ba4-8a5d-4c2b-9e82-2a08a8da88da_1570x1174.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1089,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:236575,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/162635177?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49227ba4-8a5d-4c2b-9e82-2a08a8da88da_1570x1174.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!59vu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49227ba4-8a5d-4c2b-9e82-2a08a8da88da_1570x1174.png 424w, https://substackcdn.com/image/fetch/$s_!59vu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49227ba4-8a5d-4c2b-9e82-2a08a8da88da_1570x1174.png 848w, https://substackcdn.com/image/fetch/$s_!59vu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49227ba4-8a5d-4c2b-9e82-2a08a8da88da_1570x1174.png 1272w, https://substackcdn.com/image/fetch/$s_!59vu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49227ba4-8a5d-4c2b-9e82-2a08a8da88da_1570x1174.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now let&#8217;s look at how to apply each report in the Organizer to optimise your app&#8217;s performance today <em>(and make you look like a hero in the process!)</em>.</p><div><hr></div><blockquote><p><em>Upgrade to unlock this article, plus much more:</em></p><p><em>&#127775; Access <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, my exclusive advanced content <br>&#128640; Read <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> a month before anyone else <br>&#129525; Master concurrency with my <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course">full course</a> and <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced training</a></em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p>
      <p>
          <a href="https://blog.jacobstechtavern.com/p/xcode-organiser">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How to design an SDK to handle $10bn in transactions]]></title><description><![CDATA[A deep-dive into SDK design (feat. RevenueCat)]]></description><link>https://blog.jacobstechtavern.com/p/revenuecat-sdk</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/revenuecat-sdk</guid><pubDate>Mon, 12 Jan 2026 16:01:24 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!L2oO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6eb1389-3b63-4020-bb6c-d4ac482cfe6c_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L2oO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6eb1389-3b63-4020-bb6c-d4ac482cfe6c_1680x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L2oO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6eb1389-3b63-4020-bb6c-d4ac482cfe6c_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!L2oO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6eb1389-3b63-4020-bb6c-d4ac482cfe6c_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!L2oO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6eb1389-3b63-4020-bb6c-d4ac482cfe6c_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!L2oO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6eb1389-3b63-4020-bb6c-d4ac482cfe6c_1680x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L2oO!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6eb1389-3b63-4020-bb6c-d4ac482cfe6c_1680x1200.png" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d6eb1389-3b63-4020-bb6c-d4ac482cfe6c_1680x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:3218311,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6eb1389-3b63-4020-bb6c-d4ac482cfe6c_1680x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!L2oO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6eb1389-3b63-4020-bb6c-d4ac482cfe6c_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!L2oO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6eb1389-3b63-4020-bb6c-d4ac482cfe6c_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!L2oO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6eb1389-3b63-4020-bb6c-d4ac482cfe6c_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!L2oO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6eb1389-3b63-4020-bb6c-d4ac482cfe6c_1680x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>RevenueCat has a neat business model: Take an enormously painful hassle (managing in-app subscriptions), abstract it into something bearable, and charge devs a cool 1% for the service. Classic painkiller. </p><p>This abstraction is where the value lies. </p><p>$10bn worth of value (so far!).</p><p>When tens of thousands of devs are relying on you to make money, the stakes can&#8217;t get much higher. Consequently, the <a href="https://github.com/RevenueCat/purchases-ios">RevenueCat iOS SDK</a> is one of the most battle-hardened open-source projects out there.</p><p>Therefore, <strong>we can learn a lot about SDK design principles by analysing it</strong>:</p><ul><li><p>Backwards compatibility as a top-level constraint</p></li><li><p>Fa&#231;ade-first design for public APIs</p></li><li><p>Sensible defaults and progressive disclosure of complexity</p></li><li><p>Careful layering of dependencies</p></li><li><p>Relentless logging, diagnostics, and profiling</p></li><li><p>Orchestration between services for complex flows </p></li><li><p>Offline-first correctness </p></li><li><p>&#8220;Invisible&#8221; performance characteristics </p></li><li><p>Friendly abstraction over janky third-party APIs</p></li><li><p>Keeping mindful of dev-ex (developer experience) every step of the way</p></li></ul><p>We&#8217;re taking a deep-dive into the payments flow: how the SDK abstracts away the complexity of making purchases and setting up in-app subscriptions.</p><div><hr></div><blockquote><h5><strong>Sponsored Link</strong> </h5><h4><strong><a href="https://www.revenuecat.com/blog/engineering/paywalls-changelog/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=paywalls">RevenueCat Paywalls: Build &amp; iterate subscription flows faster</a></strong></h4><p>RevenueCat Paywalls just added a steady stream of new features: more templates, deeper customization, better previews, and new promo tools. <a href="https://www.revenuecat.com/blog/engineering/paywalls-changelog/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=paywalls">Check the Paywalls changelog</a> and keep improving your subscription flows as new capabilities ship.</p></blockquote><p><em>(That&#8217;s right, I finally manifested <a href="https://blog.jacobstechtavern.com/i/138829948/the-observation-framework">my bit from 2023</a>)</em></p><div><hr></div><h2>Contents</h2><ul><li><p><a href="https://blog.jacobstechtavern.com/i/183560520/high-level-system-design">High-Level System Design</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/183560520/how-to-make-a-purchase">How to make a Purchase</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/183560520/the-facade-layer">The Fa&#231;ade Layer</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/183560520/configuration-and-progressive-disclosure">Configuration and Progressive Disclosure</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/183560520/managing-the-dependency-graph">Managing the Dependency Graph</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/183560520/the-purchase-function-and-backwards-compatibility">The Purchase function and backwards compatibility</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/183560520/the-orchestration-layer">The Orchestration Layer</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/183560520/making-the-purchase-via-storekit">Making the Purchase via StoreKit</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/183560520/handling-the-transaction-and-delegating-to-services">Handling the transaction and delegating to services</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/183560520/handoff-to-the-services-layer">Handoff to the services layer</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/183560520/the-service-layer">The Service Layer</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/183560520/transactionposter-and-backend-validation">TransactionPoster and backend validation</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/183560520/customerinfomanager-and-offline-correctness">CustomerInfoManager and offline correctness</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/183560520/the-infrastructure-layer">The Infrastructure Layer</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/183560520/last-orders">Last Orders</a></p></li></ul><div><hr></div><h2><strong>High-Level System Design</strong> </h2><p>Consider the RevenueCat SDK at a basic level: how would you design such a thing? Don&#8217;t think about payments, subscriptions, entitlements, receipt validation, and paywalling yet.</p><p>It&#8217;s easier to start with a big box that abstracts away everything a user has to worry about. </p><p>Now consider: who are the big players involved?</p><p>There&#8217;s the client app, of course, who pays you money to use the SDK. Then, with a great big box, we can represent the SDK. The other major players are StoreKit, Apple&#8217;s own servers, and of course the RevenueCat backend itself, mostly all chatting to each other. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!i918!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5ab38d4-1006-416f-b78d-1da2b9350598_1466x723.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i918!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5ab38d4-1006-416f-b78d-1da2b9350598_1466x723.png 424w, https://substackcdn.com/image/fetch/$s_!i918!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5ab38d4-1006-416f-b78d-1da2b9350598_1466x723.png 848w, https://substackcdn.com/image/fetch/$s_!i918!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5ab38d4-1006-416f-b78d-1da2b9350598_1466x723.png 1272w, https://substackcdn.com/image/fetch/$s_!i918!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5ab38d4-1006-416f-b78d-1da2b9350598_1466x723.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i918!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5ab38d4-1006-416f-b78d-1da2b9350598_1466x723.png" width="1456" height="718" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e5ab38d4-1006-416f-b78d-1da2b9350598_1466x723.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:718,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:126235,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5ab38d4-1006-416f-b78d-1da2b9350598_1466x723.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!i918!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5ab38d4-1006-416f-b78d-1da2b9350598_1466x723.png 424w, https://substackcdn.com/image/fetch/$s_!i918!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5ab38d4-1006-416f-b78d-1da2b9350598_1466x723.png 848w, https://substackcdn.com/image/fetch/$s_!i918!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5ab38d4-1006-416f-b78d-1da2b9350598_1466x723.png 1272w, https://substackcdn.com/image/fetch/$s_!i918!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5ab38d4-1006-416f-b78d-1da2b9350598_1466x723.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Mini system design drill I took during my big interview grind this December</figcaption></figure></div><p>The SDK needs to abstract all the complexity away of creating a customer, displaying products on a paywall, talking to StoreKit during a purchase, updating and handling user entitlements, and posting transaction info to a server so everything links up cross-platform.</p><p>Inside the SDK, the architecture is loosely set up in layers, with very heavy usage of constructor injection to manage dependencies across all the classes. These dependencies are all initialised on SDK init, with lower level services injected into high level managers and orchestrators where needed. </p><p>For payments, the conceptual layers look a little like:</p><ul><li><p>Fa&#231;ade layer containing <strong>Purchases</strong>, the public API surface </p></li><li><p>Orchestration layer where <strong>PurchasesOrchestrator</strong> coordinates everything</p></li><li><p>Managers layer containing business logic and services like <strong>OfferingsManager</strong>, <strong>CustomerInfoManager</strong>, and <strong>ProductsManager</strong>.</p></li><li><p>Infrastructure layer containing basic services like <strong>Backend</strong>, <strong>HTTPClient</strong>, and <strong>OperationDispatcher</strong>.</p></li></ul><p>Let&#8217;s dive down into these layers in detail to see how the SDK handles payments. </p><div><hr></div><p>There are a couple of useful keywords to clarify before we go too far into the guts of RevenueCat, because they come up a bunch:</p><ul><li><p><strong>Entitlements</strong> refers to the level of access and features the user has unlocked. For instance, whether they are on your free tier, your paid tier, or your founding members tier.</p></li><li><p><strong>Products</strong> are the different individual things a user might buy; for example a free trial, a monthly membership, or a discounted annual or lifetime membership. They list separately on the App Store, Google Play, and Stripe (for web!).</p></li><li><p><strong>Packages</strong> refers to equivalent products across platforms (basically this makes paywalling admin easier).</p></li></ul><h2>How to make a Purchase </h2><p>There are actually two ways to make purchases via the SDK:</p><ol><li><p>The default mode is using the built-in paywalls, which automatically display your offerings. Set up on the dashboard, and the SDK handles everything automatically.</p></li><li><p>You can also manually tell the SDK to execute a purchase like this. I&#8217;m going to follow this one, because we can follow through the full public API: </p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6dKV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa92ed9a-ea28-447b-880f-6725004ef237_1744x1014.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6dKV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa92ed9a-ea28-447b-880f-6725004ef237_1744x1014.png 424w, https://substackcdn.com/image/fetch/$s_!6dKV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa92ed9a-ea28-447b-880f-6725004ef237_1744x1014.png 848w, https://substackcdn.com/image/fetch/$s_!6dKV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa92ed9a-ea28-447b-880f-6725004ef237_1744x1014.png 1272w, https://substackcdn.com/image/fetch/$s_!6dKV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa92ed9a-ea28-447b-880f-6725004ef237_1744x1014.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6dKV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa92ed9a-ea28-447b-880f-6725004ef237_1744x1014.png" width="1456" height="847" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fa92ed9a-ea28-447b-880f-6725004ef237_1744x1014.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:847,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:207810,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa92ed9a-ea28-447b-880f-6725004ef237_1744x1014.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6dKV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa92ed9a-ea28-447b-880f-6725004ef237_1744x1014.png 424w, https://substackcdn.com/image/fetch/$s_!6dKV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa92ed9a-ea28-447b-880f-6725004ef237_1744x1014.png 848w, https://substackcdn.com/image/fetch/$s_!6dKV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa92ed9a-ea28-447b-880f-6725004ef237_1744x1014.png 1272w, https://substackcdn.com/image/fetch/$s_!6dKV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa92ed9a-ea28-447b-880f-6725004ef237_1744x1014.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Think of a Package the same as a Product displayed a paywall, but cross-platform</figcaption></figure></div><div><hr></div><h2>The Fa&#231;ade Layer</h2><p>Fa&#231;ade is a top-3 design pattern for me because I love the little accoutrements on the letter C there (apparently called a <em>cedilla</em>).</p><p><strong>Purchases</strong>, the main object devs use to init and use the SDK, is this fa&#231;ade, a minimal developer-friendly API that distills the tasks of complex StoreKit integration, receipt validation, and entitlement management into a few simple function calls.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qgQ8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F300659fa-d222-4e70-a3b9-9a8a8c398a42_2104x1592.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qgQ8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F300659fa-d222-4e70-a3b9-9a8a8c398a42_2104x1592.png 424w, https://substackcdn.com/image/fetch/$s_!qgQ8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F300659fa-d222-4e70-a3b9-9a8a8c398a42_2104x1592.png 848w, https://substackcdn.com/image/fetch/$s_!qgQ8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F300659fa-d222-4e70-a3b9-9a8a8c398a42_2104x1592.png 1272w, https://substackcdn.com/image/fetch/$s_!qgQ8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F300659fa-d222-4e70-a3b9-9a8a8c398a42_2104x1592.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qgQ8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F300659fa-d222-4e70-a3b9-9a8a8c398a42_2104x1592.png" width="1456" height="1102" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/300659fa-d222-4e70-a3b9-9a8a8c398a42_2104x1592.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1102,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1057010,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F300659fa-d222-4e70-a3b9-9a8a8c398a42_2104x1592.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qgQ8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F300659fa-d222-4e70-a3b9-9a8a8c398a42_2104x1592.png 424w, https://substackcdn.com/image/fetch/$s_!qgQ8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F300659fa-d222-4e70-a3b9-9a8a8c398a42_2104x1592.png 848w, https://substackcdn.com/image/fetch/$s_!qgQ8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F300659fa-d222-4e70-a3b9-9a8a8c398a42_2104x1592.png 1272w, https://substackcdn.com/image/fetch/$s_!qgQ8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F300659fa-d222-4e70-a3b9-9a8a8c398a42_2104x1592.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://github.com/RevenueCat/purchases-ios/blob/3903cae7c99e6b1edf909ba259bd52e016a06c88/Sources/Purchasing/Purchases/Purchases.swift#L61">Purchases</a></figcaption></figure></div><p>Woah, Nelly, that&#8217;s a lot of dependencies. And I redacted <em>a lot</em>. But we can spot also a few interesting SDK design techniques already: </p><ul><li><p>If the SDK is not configured, it will <strong>fatalError()</strong> on access. This is a deliberate design choice: this makes it virtually impossible for the developer to mess up basic initialisation and misuse the SDK.</p></li><li><p>Note the <strong>@objc(RCPurchase) </strong>at the class declaration. This exposes the class to Objective-C, and provides a prefixed alternative name (because ObjC uses a global namespace). Objective-C compatibility is a must when you are working with thousands of iOS projects that might never migrate to Swift. </p></li><li><p>Purchases also serves as the root of the dependency graph, owning references to all the services, managers, and orchestrators used throughout the SDK. It applies manual constructor injection, which is preferable to introducing a third-party DI framework as a sub-dependency into <em>every app shipped by your customers</em>.</p></li></ul><h4>Configuration and Progressive Disclosure </h4><p>Initialising the SDK reveals another interesting tidbit around <a href="https://developer.apple.com/videos/play/wwdc2022/10059/">progressive disclosure in API design</a>, which is vital for your dev-ex.</p><p>Most devs will start by configuring their payments SDK with the API key only.</p><pre><code>@objc(configureWithAPIKey:)
@discardableResult static func configure(withAPIKey apiKey: String) -&gt; Purchases {
    Self.configure(withAPIKey: apiKey, appUserID: nil)
}</code></pre><p>As you grow towards more advanced use cases, you might end up using this alternative function that allows for configuration:</p><pre><code>@objc(configureWithConfigurationBuilder:)
@discardableResult static func configure(with builder: Configuration.Builder) -&gt; Purchases {
    return Self.configure(with: builder.build())
}</code></pre><p>This <strong>Configuration</strong> object offers more granular control over SDK behaviour: </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!F2I5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0919e057-30f2-4ec1-bf6d-25699fcd3cd9_1584x1196.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!F2I5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0919e057-30f2-4ec1-bf6d-25699fcd3cd9_1584x1196.png 424w, https://substackcdn.com/image/fetch/$s_!F2I5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0919e057-30f2-4ec1-bf6d-25699fcd3cd9_1584x1196.png 848w, https://substackcdn.com/image/fetch/$s_!F2I5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0919e057-30f2-4ec1-bf6d-25699fcd3cd9_1584x1196.png 1272w, https://substackcdn.com/image/fetch/$s_!F2I5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0919e057-30f2-4ec1-bf6d-25699fcd3cd9_1584x1196.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!F2I5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0919e057-30f2-4ec1-bf6d-25699fcd3cd9_1584x1196.png" width="1456" height="1099" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0919e057-30f2-4ec1-bf6d-25699fcd3cd9_1584x1196.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1099,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:690652,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0919e057-30f2-4ec1-bf6d-25699fcd3cd9_1584x1196.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!F2I5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0919e057-30f2-4ec1-bf6d-25699fcd3cd9_1584x1196.png 424w, https://substackcdn.com/image/fetch/$s_!F2I5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0919e057-30f2-4ec1-bf6d-25699fcd3cd9_1584x1196.png 848w, https://substackcdn.com/image/fetch/$s_!F2I5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0919e057-30f2-4ec1-bf6d-25699fcd3cd9_1584x1196.png 1272w, https://substackcdn.com/image/fetch/$s_!F2I5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0919e057-30f2-4ec1-bf6d-25699fcd3cd9_1584x1196.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This means we can keep APIs simple while enabling customised behaviour for power users. </p><p>Consider a developer introducing this advanced configuration for the SDK to enforce response verification, hardcode StoreKit 2, and configure timeouts:</p><pre><code>let config = Configuration.Builder(withAPIKey: apiKey)
    .with(observerMode: true)
    .with(storeKitVersion: .storeKit2)
    .with(responseVerificationMode: .enforced)
    .with(networkTimeout: 90)
    .with(storeKit1Timeout: 45)
    .with(preferredLocale: "fr_FR")
    .build()
Purchases.configure(with: config)</code></pre><p>Without being able to apply this configuration at init, we would have to make the API surface far more complex, for example the basic <strong>purchase()</strong> API would require far more parameters:</p><pre><code><code>try await Purchases.shared.purchase(
    product: product,
    observerMode: true,
    storeKitVersion: .storeKit2,
    responseVerificationMode: .enforced,
    networkTimeout: 90,
    storeKit1Timeout: 45,
    preferredLocale: "fr_FR"
)</code></code></pre><p>Because this all lives in the configuration at init, the API can remain simple:</p><pre><code>try await Purchases.shared.purchase(product: product)</code></pre><p>Configuration creep is also a problem, so you need to be thoughtful about how much should be configurable locally, vs how much can be set up on a dashboard somewhere. You need to carefully balance ease-of-use, flexibility, and actual customer needs.</p><h4>Managing the Dependency Graph</h4><p>The dependency graph is all wired up in the Purchases convenience initialiser: All the services, managers, and orchestrators get created here. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Bb-Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933bf6a-7c36-4d19-9075-09eb4c2c5bb1_2314x3616.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Bb-Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933bf6a-7c36-4d19-9075-09eb4c2c5bb1_2314x3616.png 424w, https://substackcdn.com/image/fetch/$s_!Bb-Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933bf6a-7c36-4d19-9075-09eb4c2c5bb1_2314x3616.png 848w, https://substackcdn.com/image/fetch/$s_!Bb-Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933bf6a-7c36-4d19-9075-09eb4c2c5bb1_2314x3616.png 1272w, https://substackcdn.com/image/fetch/$s_!Bb-Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933bf6a-7c36-4d19-9075-09eb4c2c5bb1_2314x3616.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Bb-Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933bf6a-7c36-4d19-9075-09eb4c2c5bb1_2314x3616.png" width="1456" height="2275" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5933bf6a-7c36-4d19-9075-09eb4c2c5bb1_2314x3616.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2275,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2079816,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933bf6a-7c36-4d19-9075-09eb4c2c5bb1_2314x3616.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Bb-Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933bf6a-7c36-4d19-9075-09eb4c2c5bb1_2314x3616.png 424w, https://substackcdn.com/image/fetch/$s_!Bb-Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933bf6a-7c36-4d19-9075-09eb4c2c5bb1_2314x3616.png 848w, https://substackcdn.com/image/fetch/$s_!Bb-Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933bf6a-7c36-4d19-9075-09eb4c2c5bb1_2314x3616.png 1272w, https://substackcdn.com/image/fetch/$s_!Bb-Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933bf6a-7c36-4d19-9075-09eb4c2c5bb1_2314x3616.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://github.com/RevenueCat/purchases-ios/blob/3903cae7c99e6b1edf909ba259bd52e016a06c88/Sources/Purchasing/Purchases/Purchases.swift#L333">Purchases</a></figcaption></figure></div><blockquote><p><em>Because I&#8217;m not being paid by the letter, I redacted about 80% of the code.</em></p></blockquote><p>The layered architecture I referred to isn&#8217;t enforced <em>logically</em>, but is kept safe by the compiler: it&#8217;s impossible accidentally create a cycle when using vanilla constructor injection, because your code just won&#8217;t compile. </p><p>So I suppose it&#8217;s less like a dependency <em>graph</em>, and more like a <em>list</em> of dependencies that are instantiated, one after the other, in the order they appear in this initialiser.</p><p>This is not trivial, however: you still need to carefully design each dependency to avoid cycles, ensuring each service has only what it needs.</p><h4>The Purchase function and backwards compatibility </h4><p>It&#8217;s easy to get recursively sidetracked when analysing an interesting SDK like this. Where were we? We were searching out the <strong>purchase()</strong> function. </p><p>I found the protocol we were looking for. This is the true fa&#231;ade: the protocol with every developer-accessible function:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xxzG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8562e321-a5c6-4a26-bb40-e1016c312260_2292x1284.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xxzG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8562e321-a5c6-4a26-bb40-e1016c312260_2292x1284.png 424w, https://substackcdn.com/image/fetch/$s_!xxzG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8562e321-a5c6-4a26-bb40-e1016c312260_2292x1284.png 848w, https://substackcdn.com/image/fetch/$s_!xxzG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8562e321-a5c6-4a26-bb40-e1016c312260_2292x1284.png 1272w, https://substackcdn.com/image/fetch/$s_!xxzG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8562e321-a5c6-4a26-bb40-e1016c312260_2292x1284.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xxzG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8562e321-a5c6-4a26-bb40-e1016c312260_2292x1284.png" width="1456" height="816" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8562e321-a5c6-4a26-bb40-e1016c312260_2292x1284.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:816,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:919975,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8562e321-a5c6-4a26-bb40-e1016c312260_2292x1284.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xxzG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8562e321-a5c6-4a26-bb40-e1016c312260_2292x1284.png 424w, https://substackcdn.com/image/fetch/$s_!xxzG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8562e321-a5c6-4a26-bb40-e1016c312260_2292x1284.png 848w, https://substackcdn.com/image/fetch/$s_!xxzG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8562e321-a5c6-4a26-bb40-e1016c312260_2292x1284.png 1272w, https://substackcdn.com/image/fetch/$s_!xxzG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8562e321-a5c6-4a26-bb40-e1016c312260_2292x1284.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://github.com/RevenueCat/purchases-ios/blob/45a6db20034f2195227c34f0ab8b90e1f86bfa3b/Sources/Purchasing/Purchases/PurchasesType.swift#L325">PurchaseType</a></figcaption></figure></div><p>When creating an SDK used by tens of thousands of developers, backwards compatibility is perhaps the most important consideration of all. You aren&#8217;t Apple. You don&#8217;t really get to deprecate stuff, because devs probably don&#8217;t have a Stockholm-syndrome relationship with you.</p><p>It&#8217;s wonderful to offer shiny new async/await APIs, but you don&#8217;t get to force devs to migrate. You need to keep those &#8220;legacy&#8221; completion block forms working too. </p><p>This doesn&#8217;t mean you have to double your code: the async versions just wrap the original completion block versions using <strong>withUnsafeThrowingContinuation</strong>. </p><p>You also can&#8217;t just gate all your functionality behind the latest OS versions: as an SDK, your deployment target is constrained by <em>the customers of your customers</em>. A single gambling app supporting iOS 11 for their three surviving geriatric whales means you can&#8217;t just rip the floor out from under them. </p><blockquote><p><em>RevenueCat targets iOS 13 for <a href="https://github.com/RevenueCat/purchases-ios/tree/3903cae7c99e6b1edf909ba259bd52e016a06c88">their main SPM repo</a>, but <a href="https://cocoapods.org/pods/RevenueCat">still supports iOS 11 on Cocoapods</a>.</em></p></blockquote><p>For our <strong>purchase(package: completion:)</strong> function, the implementation is here, firing into the <strong>PurchasesOrchestrator</strong> class.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!E2a0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6687939d-b9a1-4aff-b45c-5253fb9cf0fe_1928x800.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!E2a0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6687939d-b9a1-4aff-b45c-5253fb9cf0fe_1928x800.png 424w, https://substackcdn.com/image/fetch/$s_!E2a0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6687939d-b9a1-4aff-b45c-5253fb9cf0fe_1928x800.png 848w, https://substackcdn.com/image/fetch/$s_!E2a0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6687939d-b9a1-4aff-b45c-5253fb9cf0fe_1928x800.png 1272w, https://substackcdn.com/image/fetch/$s_!E2a0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6687939d-b9a1-4aff-b45c-5253fb9cf0fe_1928x800.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!E2a0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6687939d-b9a1-4aff-b45c-5253fb9cf0fe_1928x800.png" width="1456" height="604" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6687939d-b9a1-4aff-b45c-5253fb9cf0fe_1928x800.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:604,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:505447,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6687939d-b9a1-4aff-b45c-5253fb9cf0fe_1928x800.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!E2a0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6687939d-b9a1-4aff-b45c-5253fb9cf0fe_1928x800.png 424w, https://substackcdn.com/image/fetch/$s_!E2a0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6687939d-b9a1-4aff-b45c-5253fb9cf0fe_1928x800.png 848w, https://substackcdn.com/image/fetch/$s_!E2a0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6687939d-b9a1-4aff-b45c-5253fb9cf0fe_1928x800.png 1272w, https://substackcdn.com/image/fetch/$s_!E2a0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6687939d-b9a1-4aff-b45c-5253fb9cf0fe_1928x800.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://github.com/RevenueCat/purchases-ios/blob/45a6db20034f2195227c34f0ab8b90e1f86bfa3b/Sources/Purchasing/Purchases/Purchases.swift#L1110">Purchases</a></figcaption></figure></div><p><strong>PurchasesOrchestrator</strong> is the next layer in our conceptual stack of pancakes. Or lasagna. I actually need to get lunch. </p><div><hr></div><h2>The Orchestration Layer</h2><p>This is by far the most complicated functionality in the SDK, which is why it&#8217;s fun to write about. <strong>PurchasesOrchestrator</strong> coordinates all the services and dependencies required to make a purchase, including transacting with StoreKit, posting completed transactions data to the RevenueCat backend, and updating customer entitlements locally. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7LR6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611cecd1-44d4-4852-b51d-c9a01661db81_2008x1504.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7LR6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611cecd1-44d4-4852-b51d-c9a01661db81_2008x1504.png 424w, https://substackcdn.com/image/fetch/$s_!7LR6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611cecd1-44d4-4852-b51d-c9a01661db81_2008x1504.png 848w, https://substackcdn.com/image/fetch/$s_!7LR6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611cecd1-44d4-4852-b51d-c9a01661db81_2008x1504.png 1272w, https://substackcdn.com/image/fetch/$s_!7LR6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611cecd1-44d4-4852-b51d-c9a01661db81_2008x1504.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7LR6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611cecd1-44d4-4852-b51d-c9a01661db81_2008x1504.png" width="1456" height="1091" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/611cecd1-44d4-4852-b51d-c9a01661db81_2008x1504.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1091,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1082935,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611cecd1-44d4-4852-b51d-c9a01661db81_2008x1504.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7LR6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611cecd1-44d4-4852-b51d-c9a01661db81_2008x1504.png 424w, https://substackcdn.com/image/fetch/$s_!7LR6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611cecd1-44d4-4852-b51d-c9a01661db81_2008x1504.png 848w, https://substackcdn.com/image/fetch/$s_!7LR6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611cecd1-44d4-4852-b51d-c9a01661db81_2008x1504.png 1272w, https://substackcdn.com/image/fetch/$s_!7LR6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F611cecd1-44d4-4852-b51d-c9a01661db81_2008x1504.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://github.com/RevenueCat/purchases-ios/blob/45a6db20034f2195227c34f0ab8b90e1f86bfa3b/Sources/Purchasing/Purchases/PurchasesOrchestrator.swift#L31">PurchasesOrchestrator</a></figcaption></figure></div><p>This 2000-line behemoth is the main engine driving $10bn of transactions. </p><h4>Making the Purchase via StoreKit </h4><p>Let&#8217;s follow along to the <strong>purchase()</strong> function.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!p0LX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdd0eccd-9aba-49f5-a9ab-09b9ca9cd107_2468x1372.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!p0LX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdd0eccd-9aba-49f5-a9ab-09b9ca9cd107_2468x1372.png 424w, https://substackcdn.com/image/fetch/$s_!p0LX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdd0eccd-9aba-49f5-a9ab-09b9ca9cd107_2468x1372.png 848w, https://substackcdn.com/image/fetch/$s_!p0LX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdd0eccd-9aba-49f5-a9ab-09b9ca9cd107_2468x1372.png 1272w, https://substackcdn.com/image/fetch/$s_!p0LX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdd0eccd-9aba-49f5-a9ab-09b9ca9cd107_2468x1372.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!p0LX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdd0eccd-9aba-49f5-a9ab-09b9ca9cd107_2468x1372.png" width="1456" height="809" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cdd0eccd-9aba-49f5-a9ab-09b9ca9cd107_2468x1372.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:809,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1038741,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdd0eccd-9aba-49f5-a9ab-09b9ca9cd107_2468x1372.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!p0LX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdd0eccd-9aba-49f5-a9ab-09b9ca9cd107_2468x1372.png 424w, https://substackcdn.com/image/fetch/$s_!p0LX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdd0eccd-9aba-49f5-a9ab-09b9ca9cd107_2468x1372.png 848w, https://substackcdn.com/image/fetch/$s_!p0LX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdd0eccd-9aba-49f5-a9ab-09b9ca9cd107_2468x1372.png 1272w, https://substackcdn.com/image/fetch/$s_!p0LX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdd0eccd-9aba-49f5-a9ab-09b9ca9cd107_2468x1372.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>There&#8217;s a few more interesting SDK design lessons to learn here:</p><ol><li><p>Log everything on the critical path to catch errors and hit that <a href="https://www.revenuecat.com/why-revenuecat/">99.99% SLA</a>. </p></li><li><p>We should also profile times and performance for our metrics.</p></li><li><p>Handle both <a href="https://www.revenuecat.com/blog/engineering/storekit-1-deprecation-wwdc-2024-recap/">legacy SK1</a> and SK2 transactions, while abstracting this choice away from the developer. </p></li><li><p>Wrap <strong>#available</strong> conditionals around APIs younger than the minimum deployment target to ensure backwards compatibility. </p></li><li><p>Enable users to test the flow without spending money using <strong>simulatedStoreProduct</strong>. </p></li></ol><p>Let&#8217;s follow the StoreKit 2 version. </p><p>After a brief time-skip as the SDK passes through more layers of logging, profiling, caching, and error handling, we land on the function that actually calls into Apple&#8217;s StoreKit API: </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cRZy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1002be-757c-4edf-98fe-1e2d190912b7_2024x844.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cRZy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1002be-757c-4edf-98fe-1e2d190912b7_2024x844.png 424w, https://substackcdn.com/image/fetch/$s_!cRZy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1002be-757c-4edf-98fe-1e2d190912b7_2024x844.png 848w, https://substackcdn.com/image/fetch/$s_!cRZy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1002be-757c-4edf-98fe-1e2d190912b7_2024x844.png 1272w, https://substackcdn.com/image/fetch/$s_!cRZy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1002be-757c-4edf-98fe-1e2d190912b7_2024x844.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cRZy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1002be-757c-4edf-98fe-1e2d190912b7_2024x844.png" width="1456" height="607" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d1002be-757c-4edf-98fe-1e2d190912b7_2024x844.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:607,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:546732,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1002be-757c-4edf-98fe-1e2d190912b7_2024x844.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cRZy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1002be-757c-4edf-98fe-1e2d190912b7_2024x844.png 424w, https://substackcdn.com/image/fetch/$s_!cRZy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1002be-757c-4edf-98fe-1e2d190912b7_2024x844.png 848w, https://substackcdn.com/image/fetch/$s_!cRZy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1002be-757c-4edf-98fe-1e2d190912b7_2024x844.png 1272w, https://substackcdn.com/image/fetch/$s_!cRZy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1002be-757c-4edf-98fe-1e2d190912b7_2024x844.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Notice that SDKs don&#8217;t get the luxury of ignoring new platforms like VisionOS: you need to ensure all your APIs work with all platforms by the time it&#8217;s out of Beta!</p><p>This presents the modal payment window for an in-app purchase or subscription. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2FUl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49409627-5a0b-4b22-b42f-f7f451f08fcd_1304x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2FUl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49409627-5a0b-4b22-b42f-f7f451f08fcd_1304x1048.png 424w, https://substackcdn.com/image/fetch/$s_!2FUl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49409627-5a0b-4b22-b42f-f7f451f08fcd_1304x1048.png 848w, https://substackcdn.com/image/fetch/$s_!2FUl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49409627-5a0b-4b22-b42f-f7f451f08fcd_1304x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!2FUl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49409627-5a0b-4b22-b42f-f7f451f08fcd_1304x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2FUl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49409627-5a0b-4b22-b42f-f7f451f08fcd_1304x1048.png" width="1304" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/49409627-5a0b-4b22-b42f-f7f451f08fcd_1304x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1304,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:462716,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49409627-5a0b-4b22-b42f-f7f451f08fcd_1304x1048.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2FUl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49409627-5a0b-4b22-b42f-f7f451f08fcd_1304x1048.png 424w, https://substackcdn.com/image/fetch/$s_!2FUl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49409627-5a0b-4b22-b42f-f7f451f08fcd_1304x1048.png 848w, https://substackcdn.com/image/fetch/$s_!2FUl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49409627-5a0b-4b22-b42f-f7f451f08fcd_1304x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!2FUl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49409627-5a0b-4b22-b42f-f7f451f08fcd_1304x1048.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The purchase is complete! But the orchestration journey is not over.</p><h4>Handling the transaction and delegating to services </h4><p>Apple has now processed the transaction. </p><p>But what happens when the user upgrades to a new device? What about if they move over to Android, or your web app? How do we know they aren&#8217;t fraudulently accessing your content via a jailbroken device?</p><p>These problems of <strong>entitlements</strong> and <strong>receipt validation</strong> are two of the major reasons that payments is a headache. </p><p>To kick off the second half, after calling <strong>purchase(sk2Product&#8230;)</strong>, the orchestrator manages the result of the StoreKit purchase action </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8Xoj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe832bc2d-8867-468a-b0ac-efd146337d5b_2256x1548.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8Xoj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe832bc2d-8867-468a-b0ac-efd146337d5b_2256x1548.png 424w, https://substackcdn.com/image/fetch/$s_!8Xoj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe832bc2d-8867-468a-b0ac-efd146337d5b_2256x1548.png 848w, https://substackcdn.com/image/fetch/$s_!8Xoj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe832bc2d-8867-468a-b0ac-efd146337d5b_2256x1548.png 1272w, https://substackcdn.com/image/fetch/$s_!8Xoj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe832bc2d-8867-468a-b0ac-efd146337d5b_2256x1548.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8Xoj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe832bc2d-8867-468a-b0ac-efd146337d5b_2256x1548.png" width="1456" height="999" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e832bc2d-8867-468a-b0ac-efd146337d5b_2256x1548.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:999,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:978433,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe832bc2d-8867-468a-b0ac-efd146337d5b_2256x1548.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8Xoj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe832bc2d-8867-468a-b0ac-efd146337d5b_2256x1548.png 424w, https://substackcdn.com/image/fetch/$s_!8Xoj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe832bc2d-8867-468a-b0ac-efd146337d5b_2256x1548.png 848w, https://substackcdn.com/image/fetch/$s_!8Xoj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe832bc2d-8867-468a-b0ac-efd146337d5b_2256x1548.png 1272w, https://substackcdn.com/image/fetch/$s_!8Xoj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe832bc2d-8867-468a-b0ac-efd146337d5b_2256x1548.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This does several critical things:</p><ol><li><p>Verifies this transaction using the StoreKit transaction listener, another friendly wrapper around StoreKit APIs.</p></li><li><p>If the transaction returns, it hands off the data to other SDK services. </p></li><li><p>Tracks and logs a lot more stuff.</p></li><li><p>Finally, returns the contents of the completion block (or throws an error).</p></li></ol><p>It&#8217;s used as a helper function here, but the StoreKit listener also runs in the background to catch transactions that happen outside this explicit <strong>purchase()</strong> call, such as family sharing, renewals, or restoring purchases.</p><h4>Handoff to the services layer</h4><p>As our time with the orchestrator comes to a close, <strong>handlePurchasedTransaction </strong>cleans up paywalls, tokens, and contexts, wraps up a <strong>PurchasedTransactionData</strong> object, and hands off to more services:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bGkG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3b58b71-ac5e-4554-81f2-b7d792caabed_2160x1680.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bGkG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3b58b71-ac5e-4554-81f2-b7d792caabed_2160x1680.png 424w, https://substackcdn.com/image/fetch/$s_!bGkG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3b58b71-ac5e-4554-81f2-b7d792caabed_2160x1680.png 848w, https://substackcdn.com/image/fetch/$s_!bGkG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3b58b71-ac5e-4554-81f2-b7d792caabed_2160x1680.png 1272w, https://substackcdn.com/image/fetch/$s_!bGkG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3b58b71-ac5e-4554-81f2-b7d792caabed_2160x1680.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bGkG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3b58b71-ac5e-4554-81f2-b7d792caabed_2160x1680.png" width="1456" height="1132" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b3b58b71-ac5e-4554-81f2-b7d792caabed_2160x1680.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1132,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:975978,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3b58b71-ac5e-4554-81f2-b7d792caabed_2160x1680.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bGkG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3b58b71-ac5e-4554-81f2-b7d792caabed_2160x1680.png 424w, https://substackcdn.com/image/fetch/$s_!bGkG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3b58b71-ac5e-4554-81f2-b7d792caabed_2160x1680.png 848w, https://substackcdn.com/image/fetch/$s_!bGkG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3b58b71-ac5e-4554-81f2-b7d792caabed_2160x1680.png 1272w, https://substackcdn.com/image/fetch/$s_!bGkG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3b58b71-ac5e-4554-81f2-b7d792caabed_2160x1680.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Let&#8217;s take a look at two of these critical services now. </p><div><hr></div><h2>The Service Layer</h2><p>There&#8217;s two important services used here to finalise a purchase: <strong>TransactionPoster</strong> and <strong>CustomerInfoManager</strong>.</p><h4>TransactionPoster and backend validation </h4><p>TransactionPoster itself, as a relatively high-level specialised service, further builds on top of several lower-level dependencies.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oi7c!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff88b0cb7-0319-45da-b5d1-5c5d2ee52d9b_1584x844.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oi7c!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff88b0cb7-0319-45da-b5d1-5c5d2ee52d9b_1584x844.png 424w, https://substackcdn.com/image/fetch/$s_!oi7c!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff88b0cb7-0319-45da-b5d1-5c5d2ee52d9b_1584x844.png 848w, https://substackcdn.com/image/fetch/$s_!oi7c!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff88b0cb7-0319-45da-b5d1-5c5d2ee52d9b_1584x844.png 1272w, https://substackcdn.com/image/fetch/$s_!oi7c!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff88b0cb7-0319-45da-b5d1-5c5d2ee52d9b_1584x844.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oi7c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff88b0cb7-0319-45da-b5d1-5c5d2ee52d9b_1584x844.png" width="1456" height="776" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f88b0cb7-0319-45da-b5d1-5c5d2ee52d9b_1584x844.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:776,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:493366,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff88b0cb7-0319-45da-b5d1-5c5d2ee52d9b_1584x844.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oi7c!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff88b0cb7-0319-45da-b5d1-5c5d2ee52d9b_1584x844.png 424w, https://substackcdn.com/image/fetch/$s_!oi7c!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff88b0cb7-0319-45da-b5d1-5c5d2ee52d9b_1584x844.png 848w, https://substackcdn.com/image/fetch/$s_!oi7c!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff88b0cb7-0319-45da-b5d1-5c5d2ee52d9b_1584x844.png 1272w, https://substackcdn.com/image/fetch/$s_!oi7c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff88b0cb7-0319-45da-b5d1-5c5d2ee52d9b_1584x844.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://github.com/RevenueCat/purchases-ios/blob/45a6db20034f2195227c34f0ab8b90e1f86bfa3b/Sources/Purchasing/Purchases/TransactionPoster.swift#L58">TransactionPoster</a></figcaption></figure></div><p>After <strong>PurchasesOrchestrator</strong> finishes a transaction, it asks <strong>TransactionPoster</strong> to send StoreKit receipts to the RevenueCat backend, which then <a href="https://medium.com/revenuecat-blog/dissecting-an-app-store-receipt-b1e9c5136482">validates the receipt</a>, verifies the customer&#8217;s subscription, and returns confirmation to the SDK.  </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-1Fq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5230d82f-764c-47a0-a67d-b48ad1604c41_2142x1680.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-1Fq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5230d82f-764c-47a0-a67d-b48ad1604c41_2142x1680.png 424w, https://substackcdn.com/image/fetch/$s_!-1Fq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5230d82f-764c-47a0-a67d-b48ad1604c41_2142x1680.png 848w, https://substackcdn.com/image/fetch/$s_!-1Fq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5230d82f-764c-47a0-a67d-b48ad1604c41_2142x1680.png 1272w, https://substackcdn.com/image/fetch/$s_!-1Fq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5230d82f-764c-47a0-a67d-b48ad1604c41_2142x1680.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-1Fq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5230d82f-764c-47a0-a67d-b48ad1604c41_2142x1680.png" width="1456" height="1142" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5230d82f-764c-47a0-a67d-b48ad1604c41_2142x1680.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1142,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:990760,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5230d82f-764c-47a0-a67d-b48ad1604c41_2142x1680.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-1Fq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5230d82f-764c-47a0-a67d-b48ad1604c41_2142x1680.png 424w, https://substackcdn.com/image/fetch/$s_!-1Fq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5230d82f-764c-47a0-a67d-b48ad1604c41_2142x1680.png 848w, https://substackcdn.com/image/fetch/$s_!-1Fq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5230d82f-764c-47a0-a67d-b48ad1604c41_2142x1680.png 1272w, https://substackcdn.com/image/fetch/$s_!-1Fq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5230d82f-764c-47a0-a67d-b48ad1604c41_2142x1680.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Pretty much every one of these functions calls into of the dependencies above: </p><ul><li><p><strong>product(with: productIdentifier)</strong> calls into <strong>productsManager</strong> to the available products.</p></li><li><p><strong>postReceipt()</strong> tells the <strong>backend</strong> to actually send the receipt to RevenueCat servers.</p></li><li><p><strong>handleReceiptPost()</strong> calls into <strong>operationDispatcher</strong> to jump to the main actor and performing the callback thread-safely.</p></li></ul><h4>CustomerInfoManager and offline correctness </h4><p><strong>CustomerInfoManager</strong> is where the entitlements of the user live. This is one of the most important services, because it dictates whether a user can access paywalled content in your app, or not. It&#8217;s really important to get this right. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!G3sY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9784eed-a541-43b0-a3a9-e2463f4de6a4_2296x1152.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G3sY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9784eed-a541-43b0-a3a9-e2463f4de6a4_2296x1152.png 424w, https://substackcdn.com/image/fetch/$s_!G3sY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9784eed-a541-43b0-a3a9-e2463f4de6a4_2296x1152.png 848w, https://substackcdn.com/image/fetch/$s_!G3sY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9784eed-a541-43b0-a3a9-e2463f4de6a4_2296x1152.png 1272w, https://substackcdn.com/image/fetch/$s_!G3sY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9784eed-a541-43b0-a3a9-e2463f4de6a4_2296x1152.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G3sY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9784eed-a541-43b0-a3a9-e2463f4de6a4_2296x1152.png" width="1456" height="731" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b9784eed-a541-43b0-a3a9-e2463f4de6a4_2296x1152.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:731,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:780355,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9784eed-a541-43b0-a3a9-e2463f4de6a4_2296x1152.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!G3sY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9784eed-a541-43b0-a3a9-e2463f4de6a4_2296x1152.png 424w, https://substackcdn.com/image/fetch/$s_!G3sY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9784eed-a541-43b0-a3a9-e2463f4de6a4_2296x1152.png 848w, https://substackcdn.com/image/fetch/$s_!G3sY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9784eed-a541-43b0-a3a9-e2463f4de6a4_2296x1152.png 1272w, https://substackcdn.com/image/fetch/$s_!G3sY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9784eed-a541-43b0-a3a9-e2463f4de6a4_2296x1152.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://github.com/RevenueCat/purchases-ios/blob/45a6db20034f2195227c34f0ab8b90e1f86bfa3b/Sources/Identity/CustomerInfoManager.swift#L18">CustomerInfoManager</a></figcaption></figure></div><p>Once the <strong>PurchasesOrchestrator</strong> has posted the receipt, it updates the cache on <strong>CustomerInfoManager</strong> to ensure entitlements are readily available, both for speed of retrieval and to ensure it still works offline.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!17vm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3bb31689-05c6-4144-b70b-40fe1b98d88a_2142x1152.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!17vm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3bb31689-05c6-4144-b70b-40fe1b98d88a_2142x1152.png 424w, https://substackcdn.com/image/fetch/$s_!17vm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3bb31689-05c6-4144-b70b-40fe1b98d88a_2142x1152.png 848w, https://substackcdn.com/image/fetch/$s_!17vm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3bb31689-05c6-4144-b70b-40fe1b98d88a_2142x1152.png 1272w, https://substackcdn.com/image/fetch/$s_!17vm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3bb31689-05c6-4144-b70b-40fe1b98d88a_2142x1152.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!17vm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3bb31689-05c6-4144-b70b-40fe1b98d88a_2142x1152.png" width="1456" height="783" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3bb31689-05c6-4144-b70b-40fe1b98d88a_2142x1152.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:783,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:708890,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3bb31689-05c6-4144-b70b-40fe1b98d88a_2142x1152.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!17vm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3bb31689-05c6-4144-b70b-40fe1b98d88a_2142x1152.png 424w, https://substackcdn.com/image/fetch/$s_!17vm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3bb31689-05c6-4144-b70b-40fe1b98d88a_2142x1152.png 848w, https://substackcdn.com/image/fetch/$s_!17vm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3bb31689-05c6-4144-b70b-40fe1b98d88a_2142x1152.png 1272w, https://substackcdn.com/image/fetch/$s_!17vm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3bb31689-05c6-4144-b70b-40fe1b98d88a_2142x1152.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p> In the end, this more or less lands in UserDefaults. Nothing is ever magic. </p><p>It&#8217;s really, really, really important that an SDK works in all sorts of conditions, such as poor network, low power mode, and offline. </p><p>One of the <strong>CustomerInfoManager</strong> dependencies, <strong>OfflineEntitlementsManager</strong>, acts as the fallback; computing customer info from locally-persisted SK2 purchase history and cached information on products and entitlements. </p><p>This is an instance where you can influence API design to improve developer experience: giving devs control over how they want to fetch customer info data, with a choice between speed and correctness.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nUqM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22371816-4451-4543-b187-a384b532c900_1834x1196.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nUqM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22371816-4451-4543-b187-a384b532c900_1834x1196.png 424w, https://substackcdn.com/image/fetch/$s_!nUqM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22371816-4451-4543-b187-a384b532c900_1834x1196.png 848w, https://substackcdn.com/image/fetch/$s_!nUqM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22371816-4451-4543-b187-a384b532c900_1834x1196.png 1272w, https://substackcdn.com/image/fetch/$s_!nUqM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22371816-4451-4543-b187-a384b532c900_1834x1196.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nUqM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22371816-4451-4543-b187-a384b532c900_1834x1196.png" width="1456" height="949" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/22371816-4451-4543-b187-a384b532c900_1834x1196.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:949,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:678651,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22371816-4451-4543-b187-a384b532c900_1834x1196.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nUqM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22371816-4451-4543-b187-a384b532c900_1834x1196.png 424w, https://substackcdn.com/image/fetch/$s_!nUqM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22371816-4451-4543-b187-a384b532c900_1834x1196.png 848w, https://substackcdn.com/image/fetch/$s_!nUqM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22371816-4451-4543-b187-a384b532c900_1834x1196.png 1272w, https://substackcdn.com/image/fetch/$s_!nUqM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22371816-4451-4543-b187-a384b532c900_1834x1196.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2>The Infrastructure Layer </h2><p>With a layered architecture SDK like this, it&#8217;s very easy to spend 50,000 words recursively going into every nook and cranny, but I think this is a really good time to take a break here. </p><p>Ok, fine, I&#8217;ll talk about <strong>Backend</strong> really quickly because it appears <em>everywhere</em>. </p><p>When you want to call something on the backend, you call something like: <strong>backend.offerings.getOfferings()</strong> or <strong>backend.identity.logIn()</strong>. This is because Backend serves as a neatly name-spaced API gateway. A composition surface for all of the network requests you might need.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!a2c4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73bad46-ffff-44a6-acec-2def46e4cadb_1316x932.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!a2c4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73bad46-ffff-44a6-acec-2def46e4cadb_1316x932.png 424w, https://substackcdn.com/image/fetch/$s_!a2c4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73bad46-ffff-44a6-acec-2def46e4cadb_1316x932.png 848w, https://substackcdn.com/image/fetch/$s_!a2c4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73bad46-ffff-44a6-acec-2def46e4cadb_1316x932.png 1272w, https://substackcdn.com/image/fetch/$s_!a2c4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73bad46-ffff-44a6-acec-2def46e4cadb_1316x932.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!a2c4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73bad46-ffff-44a6-acec-2def46e4cadb_1316x932.png" width="1316" height="932" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f73bad46-ffff-44a6-acec-2def46e4cadb_1316x932.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:932,&quot;width&quot;:1316,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:471227,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/183560520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73bad46-ffff-44a6-acec-2def46e4cadb_1316x932.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!a2c4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73bad46-ffff-44a6-acec-2def46e4cadb_1316x932.png 424w, https://substackcdn.com/image/fetch/$s_!a2c4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73bad46-ffff-44a6-acec-2def46e4cadb_1316x932.png 848w, https://substackcdn.com/image/fetch/$s_!a2c4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73bad46-ffff-44a6-acec-2def46e4cadb_1316x932.png 1272w, https://substackcdn.com/image/fetch/$s_!a2c4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73bad46-ffff-44a6-acec-2def46e4cadb_1316x932.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://github.com/RevenueCat/purchases-ios/blob/45a6db20034f2195227c34f0ab8b90e1f86bfa3b/Sources/Networking/Backend.swift#L16">Backend</a></figcaption></figure></div><p>This low-level infra isn&#8217;t immune to containing various dependencies: a collection of all the different APIs and endpoints the SDK can talk to, as well as a BackendConfiguration object containing services like <strong>HTTPClient</strong>,<strong> </strong>which wraps <strong>URLSession</strong> and handles ETag caching, response verification, request signing, retrying, and serialisation with operation queues. </p><p>Naturally, the level of logging and profiling required on the network layer is more important than ever.</p><div><hr></div><h2>Last Orders </h2><p>The RevenueCat iOS SDK creates a reliable and easy-to-use way to handle a deeply complex field like payments, and has helped process $10bn in revenue (and counting!) for developers across the world. Following through the payment orchestration logic in this battle-tested project teaches us a great deal about SDK design. </p><ul><li><p>Backwards compatibility is a first-class consideration.</p></li><li><p>You need a really strong handle on error handling, logging, and profiling.</p></li><li><p>The APIs need to be dead simple, with  progressive disclosure of advanced use cases via confirmation.</p></li><li><p>Your dependency graph needs to be layered thoughtfully, with more complex services relying on low-level core infrastructure. </p></li><li><p>Your code has to work on a wide range of platforms and OS version.</p></li><li><p>You need to work in imperfect device conditions, including offline.</p></li></ul><p>I didn&#8217;t cover this anywhere in the low-level code, but one more critical design consideration when building an SDK is that <strong>it should be invisible</strong>: there when you need it, but otherwise negligible in terms of its impact on performance characteristics like app launch time, CPU load, disk and network I/O, and app size. </p><p>Finally, because an SDK is often a piece of critical infrastructure, you also need to <strong>treat tests with the same care as production code</strong>.</p><blockquote><h5><strong>Sponsored Link</strong> </h5><h4><strong><a href="https://www.revenuecat.com/blog/engineering/paywalls-changelog/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=paywalls">RevenueCat Paywalls: Build &amp; iterate subscription flows faster</a></strong></h4><p>RevenueCat Paywalls just added a steady stream of new features: more templates, deeper customization, better previews, and new promo tools. <a href="https://www.revenuecat.com/blog/engineering/paywalls-changelog/?utm_medium=sponsored&amp;utm_source=JacobsTechTavern&amp;utm_campaign=general_sponsorship&amp;utm_content=paywalls">Check the Paywalls changelog</a> and keep improving your subscription flows as new capabilities ship.</p></blockquote><div><hr></div><blockquote><p><em>If you liked my post, subscribe free to join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week.</em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[10 techniques to pass 90% of algorithmic interviews ]]></title><description><![CDATA[Learnings from my long-overdue LeetCode grind]]></description><link>https://blog.jacobstechtavern.com/p/rage-against-the-leetcode</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/rage-against-the-leetcode</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Tue, 06 Jan 2026 16:01:38 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!V4B4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8fd643d-5cad-4e62-b637-194fda723d47_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!V4B4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8fd643d-5cad-4e62-b637-194fda723d47_1680x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!V4B4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8fd643d-5cad-4e62-b637-194fda723d47_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!V4B4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8fd643d-5cad-4e62-b637-194fda723d47_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!V4B4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8fd643d-5cad-4e62-b637-194fda723d47_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!V4B4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8fd643d-5cad-4e62-b637-194fda723d47_1680x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!V4B4!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8fd643d-5cad-4e62-b637-194fda723d47_1680x1200.png" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e8fd643d-5cad-4e62-b637-194fda723d47_1680x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:1991651,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181052142?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8fd643d-5cad-4e62-b637-194fda723d47_1680x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!V4B4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8fd643d-5cad-4e62-b637-194fda723d47_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!V4B4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8fd643d-5cad-4e62-b637-194fda723d47_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!V4B4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8fd643d-5cad-4e62-b637-194fda723d47_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!V4B4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8fd643d-5cad-4e62-b637-194fda723d47_1680x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In my 10ish years of experience (always round up), I&#8217;ve so far managed to deftly flit between startups with under-developed hiring processes. I&#8217;m a master of slipping through the cracks and convincing entrepreneurs that I&#8217;m hot sh*t at iOS.<br><br>What I&#8217;m trying to say is, I&#8217;ve managed to avoid actually learning how to answer algorithmic technical interview questions, a.k.a. <strong>LeetCode</strong>.</p><p>Many people consider LeetCode to be the <em>&#8220;<a href="https://news.ycombinator.com/item?id=36654947">highest ROI activity in tech</a>&#8221;</em>. This is because it unlocks the door to big American tech companies that typically pay way better than everyone else. </p><p>Why does this filter have zero bearing on day-to-day work in a tech job?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Q8a3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af65237-0791-44f4-93f0-5e50a341ef2c_1190x402.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Q8a3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af65237-0791-44f4-93f0-5e50a341ef2c_1190x402.png 424w, https://substackcdn.com/image/fetch/$s_!Q8a3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af65237-0791-44f4-93f0-5e50a341ef2c_1190x402.png 848w, https://substackcdn.com/image/fetch/$s_!Q8a3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af65237-0791-44f4-93f0-5e50a341ef2c_1190x402.png 1272w, https://substackcdn.com/image/fetch/$s_!Q8a3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af65237-0791-44f4-93f0-5e50a341ef2c_1190x402.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Q8a3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af65237-0791-44f4-93f0-5e50a341ef2c_1190x402.png" width="1190" height="402" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2af65237-0791-44f4-93f0-5e50a341ef2c_1190x402.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:402,&quot;width&quot;:1190,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:67209,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181052142?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af65237-0791-44f4-93f0-5e50a341ef2c_1190x402.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Q8a3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af65237-0791-44f4-93f0-5e50a341ef2c_1190x402.png 424w, https://substackcdn.com/image/fetch/$s_!Q8a3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af65237-0791-44f4-93f0-5e50a341ef2c_1190x402.png 848w, https://substackcdn.com/image/fetch/$s_!Q8a3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af65237-0791-44f4-93f0-5e50a341ef2c_1190x402.png 1272w, https://substackcdn.com/image/fetch/$s_!Q8a3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af65237-0791-44f4-93f0-5e50a341ef2c_1190x402.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://x.com/iamdevloper/status/986193182936485888">I am devloper on Twitter</a></figcaption></figure></div><p>And why do these companies all support have the same hiring process? </p><ol><li><p><strong>LeetCode enforces a minimum competency bar.</strong><br>LeetCode interviews help avoid &#8220;false positives&#8221;. Big tech is optimising to avoid bad hires, <a href="https://x.com/mxcl/status/608682016205344768?ref_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed%7Ctwterm%5E608682016205344768%7Ctwgr%5Efa64f8c7c90f3d5563c82db1233388aef96f3f59%7Ctwcon%5Es1_&amp;ref_url=https%3A%2F%2Fwww.redditmedia.com%2Fmediaembed%2F39d0u1%2F%3Fresponsive%3Dtrueis_nightmode%3Dtrue">at the expense of rejecting some good candidates</a>. LeetCode provides a very standardised way to discover if a candidate can perform a moderately complex coding task under time pressure. </p></li><li><p><strong>LeetCode selects for people willing to endure an arbitrary grind.<br></strong><em><strong>(</strong>You aren&#8217;t meant to say this bit out loud).</em> <br>In economics, LeetCode is called &#8220;costly signalling&#8221;. People who grind LeetCode to land a job are probably conscientious, have a high tolerance for bureaucracy, and will happily sacrifice their free time for career advancement. </p></li></ol><p>As big tech hiring scaled up, and everyone wanted to cargo-cult Google, the mythical &#8220;algorithmic challenge&#8221; devolved into a cookie-cutter exercise, where candidates pretend to be a secret genius improvising a novel solution as they go*.</p><blockquote><p><em>*Top tip: don&#8217;t actually refer to this as &#8220;kayfabe&#8221; during your LeetCode interview&#8221;</em></p></blockquote><p>LeetCode was a moderately embarrassing weakness I&#8217;d failed to address, until now.</p><p>It wasn&#8217;t for lack of trying! </p><p>I halfheartedly started LeetCoding a few years ago, but after sinking in a few commutes into Two Sum and Valid Parenthesis, decided it&#8217;d be more interesting to focus on my blog. </p><p>In retrospect, <a href="https://blog.jacobstechtavern.com">perhaps that was a good decision</a>.</p><div><hr></div><p>I&#8217;m meandering. <em>&#8220;Can you get to the damn point?&#8221;</em>, I hear you ask from the future.</p><p>Big tech devs (mostly) aren&#8217;t geniuses. They&#8217;re pattern-recognition machines.</p><p>LeetCode is purely an exercise in pattern recognition.</p><p>The same ~10 patterns, over and over. In various configurations. </p><p>That&#8217;s why I can legitimately tell you that there&#8217;s 10 techniques that will carry you through the <em>vast</em> majority of LeetCode interviews. </p><p>You can take my word for this as well, because I&#8217;ve got a 100% pass rate on the 4-5 legit LeetCode interview loops I&#8217;ve actually done, and I will <em>not</em> be updating this if things go badly with Snap tomorrow.</p><p>Okay so <strong>what&#8217;s on the menu today?</strong> </p><ul><li><p>I&#8217;m going to demonstrate the 10 techniques that virtually every LeetCode question maps onto. </p></li><li><p>For each technique, I&#8217;ll show you a bona-fide LeetCode question that applies it, alongside my actual diary notes I wrote while trying them for the first time, so you don&#8217;t feel so alone when you do it. </p></li><li><p>Finally, I&#8217;ll give you my rough field-guide for staying sane in The Grind&#8482;. To be honest, I would recommend reading this first, because then you feel less bad during the rest of the article.  </p></li></ul><div><hr></div><h2>Contents</h2><ul><li><p><strong><a href="https://blog.jacobstechtavern.com/i/181052142/the-techniques">The 10 Techniques</a></strong></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/hashmaps">Hashmaps</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/my-leetcode-diary-ransom-note">LeetCode Diary: #383 Ransom Note</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/two-pointers">Two pointers</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/my-leetcode-diary-linked-list-cycle">LeetCode Diary: Linked List Cycle</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/sliding-windows">Sliding windows</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/my-leetcode-diary-longest-substring-without-repeating-characters">LeetCode Diary: #3 Longest Substring without Repeating Characters</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/stack-based-and-queue-based-parsing">Stack-based and queue-based parsing </a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/my-leetcode-diary-evaluate-reverse-polish-notation">LeetCode Diary: #150 Evaluate Reverse Polish Notation</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/binary-search">Binary search</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/my-leetcode-diary-binary-search">LeetCode Diary: #704 Binary Search</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/trees-recursion-and-dfs">Trees, Recursion and DFS</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/my-leetcode-diary-validate-binary-search-tree">LeetCode Diary: #98 Validate Binary Search Tree</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/graphs-traversal-and-bfs">Graphs, Traversal, and BFS</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/my-leetcode-diary-number-of-islands">LeetCode Diary: #200 Number of Islands</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/backtracking">Backtracking</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/my-leetcode-diary-permutations">LeetCode Diary: #46 Permutations</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/sort-and-sweep">Sort-and-sweep</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/my-leetcode-diary-insert-interval">LeetCode Diary: #57 Insert Interval</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/dynamic-programming">Dynamic Programming</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181052142/my-leetcode-diary-coin-change">LeetCode Diary:</a><strong><a href="https://blog.jacobstechtavern.com/i/181052142/my-leetcode-diary-coin-change"> #322 Coin Change</a></strong></p></li></ul></li></ul></li><li><p><strong><a href="https://blog.jacobstechtavern.com/i/181052142/staying-sane-in-the-grind">Staying sane in The Grind&#8482;</a></strong></p></li><li><p><strong><a href="https://blog.jacobstechtavern.com/i/181052142/last-orders">Last Orders</a></strong></p></li></ul><blockquote><p><em>This post is super long, so your email client may cut it off. Read on my website here:</em> </p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/p/rage-against-the-leetcode&quot;,&quot;text&quot;:&quot;Read on my website&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/p/rage-against-the-leetcode"><span>Read on my website</span></a></p><div><hr></div><h2>The 10 Techniques </h2><h3>Hashmaps </h3><p>Hashmaps (a.k.a. Dictionaries) are the basic cheat code for any algorithmic question, because they offer O(1) lookups (a.k.a. <a href="https://en.wikipedia.org/wiki/Time_complexity">constant time complexity</a>)*. </p><p>Virtually every time I&#8217;ve done a real-life LeetCode interview, I&#8217;ll write a solution that&#8217;s messy, inefficient, but works. After verifying my code, I&#8217;ll be asked &#8220;how efficient is that?&#8221; and check the time complexity, and be gently prompted to make it more efficient**. </p><p>This is usually code for &#8220;use a hash map&#8221;. </p><blockquote><p><em>*Sets also have constant time lookups, but you&#8217;ll use those less often.</em></p><p><em>**If you&#8217;re a better candidate than me, you can do this without being asked.</em></p></blockquote><p>Hashmap problems take many forms. You might build a dictionary to count the frequencies of each character in a paragraph. You might use a hashmap to cache values, and efficiently check if a value has already been computed or not. You might  do something clever with keys, by computing a value that you&#8217;ll need later, &#224;-la the O.G. <a href="https://leetcode.com/problems/two-sum/description/">Two Sum</a> problem. </p><p>The core pattern is making one pass through the input data to construct the hashmap, then another to query whatever you need. Sometimes, you can do both at the same time and exit early. </p><p>That was a lot of words. If you&#8217;re a LeetCode novice, I hope I haven&#8217;t scared you off. Here&#8217;s a nice LC Easy to cleanse the palette. </p><h4>My LeetCode Diary: #383 <a href="https://leetcode.com/problems/ransom-note/description/">Ransom Note</a> </h4><p>Surprisingly, I&#8217;m actually pretty good at traversing a collection and populating a dictionary. This might be the first LeetCode problem I found, dare I say, <em>fun</em>.</p><p>This is the classic hashmap approach, iterating through to count the characters, and traversing again to decrement and check you have enough characters for the target.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XTap!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5982fc-e44c-49ff-85d4-8ee08e4c1880_1624x1240.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XTap!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5982fc-e44c-49ff-85d4-8ee08e4c1880_1624x1240.png 424w, https://substackcdn.com/image/fetch/$s_!XTap!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5982fc-e44c-49ff-85d4-8ee08e4c1880_1624x1240.png 848w, https://substackcdn.com/image/fetch/$s_!XTap!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5982fc-e44c-49ff-85d4-8ee08e4c1880_1624x1240.png 1272w, https://substackcdn.com/image/fetch/$s_!XTap!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5982fc-e44c-49ff-85d4-8ee08e4c1880_1624x1240.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XTap!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5982fc-e44c-49ff-85d4-8ee08e4c1880_1624x1240.png" width="1456" height="1112" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fc5982fc-e44c-49ff-85d4-8ee08e4c1880_1624x1240.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1112,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:250444,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181052142?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5982fc-e44c-49ff-85d4-8ee08e4c1880_1624x1240.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XTap!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5982fc-e44c-49ff-85d4-8ee08e4c1880_1624x1240.png 424w, https://substackcdn.com/image/fetch/$s_!XTap!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5982fc-e44c-49ff-85d4-8ee08e4c1880_1624x1240.png 848w, https://substackcdn.com/image/fetch/$s_!XTap!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5982fc-e44c-49ff-85d4-8ee08e4c1880_1624x1240.png 1272w, https://substackcdn.com/image/fetch/$s_!XTap!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5982fc-e44c-49ff-85d4-8ee08e4c1880_1624x1240.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>You aren&#8217;t limited to integers and characters in your hashmap either. </p><p>You can store Linked List or Tree nodes in a dictionary. This is often the solution to  any &#8220;make a data structure with O(1) reads and writes&#8221; problem (see <a href="https://leetcode.com/problems/lru-cache/">LRU Cache</a>). </p><p>You can also place Graph edges into a dictionary for a topological sort (see <a href="https://leetcode.com/problems/course-schedule/description/">Course Schedule</a>), or just track &#8220;visited&#8221; nodes for a depth-first search (see <a href="https://leetcode.com/problems/clone-graph/description/">Clone Graph</a>).</p><div><hr></div><h3>Two pointers </h3><p>This is probably my favourite technique, because I feel dead smart every time I use it. </p><blockquote><p><em>Upgrade to unlock this article, plus much more:</em></p><p><em>&#127775; Access <a href="https://blog.jacobstechtavern.com/t/elite-hacks">Elite Hacks</a>, my exclusive advanced content <br>&#128640; Read <a href="https://blog.jacobstechtavern.com/archive?sort=top">my free articles</a> a month before anyone else <br>&#129525; Master concurrency with my <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-course">course</a> and <a href="https://blog.jacobstechtavern.com/p/swift-concurrency-kata">advanced training</a></em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p>
      <p>
          <a href="https://blog.jacobstechtavern.com/p/rage-against-the-leetcode">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[🎄 I just gifted you 14 days' membership ]]></title><description><![CDATA[Thanks for being a paid member &#127873;]]></description><link>https://blog.jacobstechtavern.com/p/i-just-gifted-you-14-days-membership</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/i-just-gifted-you-14-days-membership</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Fri, 19 Dec 2025 17:00:03 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!V4B4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8fd643d-5cad-4e62-b637-194fda723d47_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Seasons greetings,</p><p>I&#8217;ve been pretty flat out this month grinding interview loops, so haven&#8217;t had much time to write. Plus, the kids are off school &amp; nursery over the Christmas break, and I am told Christmas is a good time for family and stuff.</p><p>Hence, I&#8217;m taking a well-deserved 2-week break over Christmas.</p><p>To soften the blow, <strong>I gifted all my paid subscriber&#8230;</strong></p>
      <p>
          <a href="https://blog.jacobstechtavern.com/p/i-just-gifted-you-14-days-membership">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Copy-on-write teaches you EVERYTHING about Swift Internals 🐮]]></title><description><![CDATA[isKnownUniquelyReferenced through the standard library, compiler, and runtime]]></description><link>https://blog.jacobstechtavern.com/p/copy-on-write-swift-internals</link><guid isPermaLink="false">https://blog.jacobstechtavern.com/p/copy-on-write-swift-internals</guid><dc:creator><![CDATA[Jacob Bartlett]]></dc:creator><pubDate>Mon, 15 Dec 2025 16:01:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!PKCV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f613f8c-801d-45d0-a449-8de15596b5a4_1680x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PKCV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f613f8c-801d-45d0-a449-8de15596b5a4_1680x1200.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PKCV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f613f8c-801d-45d0-a449-8de15596b5a4_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!PKCV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f613f8c-801d-45d0-a449-8de15596b5a4_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!PKCV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f613f8c-801d-45d0-a449-8de15596b5a4_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!PKCV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f613f8c-801d-45d0-a449-8de15596b5a4_1680x1200.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PKCV!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f613f8c-801d-45d0-a449-8de15596b5a4_1680x1200.png" width="1200" height="857.1428571428571" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f613f8c-801d-45d0-a449-8de15596b5a4_1680x1200.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:4428875,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f613f8c-801d-45d0-a449-8de15596b5a4_1680x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PKCV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f613f8c-801d-45d0-a449-8de15596b5a4_1680x1200.png 424w, https://substackcdn.com/image/fetch/$s_!PKCV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f613f8c-801d-45d0-a449-8de15596b5a4_1680x1200.png 848w, https://substackcdn.com/image/fetch/$s_!PKCV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f613f8c-801d-45d0-a449-8de15596b5a4_1680x1200.png 1272w, https://substackcdn.com/image/fetch/$s_!PKCV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f613f8c-801d-45d0-a449-8de15596b5a4_1680x1200.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>There is a global function in Swift that, when you fully understand it, will teach you everything you need to know about Swift internals. </p><p>You&#8217;ll never guess what it is, because I guarantee you&#8217;ve used it less than 3 times in the real world, if you&#8217;ve even heard of it.</p><p><strong>isKnownUniquelyReferenced()</strong>. </p><p>If you know, you know: this function powers the <strong>copy-on-write</strong> optimisation (a.k.a. CoW, a.k.a.k.a. &#128046;). </p><p>It pretty much only ever comes up if a) you&#8217;re a library author, or b) you&#8217;re interviewing someone and want to rate their power level when it comes to Swift internals*</p><blockquote><p><em>*I never let interviews get to this point, because I <a href="https://blog.jacobstechtavern.com/p/swift-reference-counting">burn 45 minutes responding to their first question about weak references</a>.</em> </p></blockquote><p>I wanted to understand how this function worked, and little did I know that it would take me on an odyssey through every single layer and sublayer of the Swift source code. Seriously. Every layer. </p><p>As it happens, it&#8217;s pretty much the perfect candidate for doing this. <a href="https://blog.jacobstechtavern.com/p/swift-source-code">type(of:) comes close</a>, but doesn&#8217;t quite stick the landing in as satisfying a way. </p><p>Will learning all this make your hairline recede another inch? Yes. </p><p>Are you going to come on a fun journey to learn Swift Internals&#8482;? Also yes.</p><p>Let&#8217;s work through the various sublayers of the p&#822;l&#822;a&#822;n&#822;e&#822;t&#822; <a href="https://github.com/swiftlang/swift">Swift Source Code</a> and discover once and for all how isKnownUniquelyReferenced works. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EtLW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17defc1c-ee2d-4efc-ba76-a234bbd42ad5_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EtLW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17defc1c-ee2d-4efc-ba76-a234bbd42ad5_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!EtLW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17defc1c-ee2d-4efc-ba76-a234bbd42ad5_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!EtLW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17defc1c-ee2d-4efc-ba76-a234bbd42ad5_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!EtLW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17defc1c-ee2d-4efc-ba76-a234bbd42ad5_1920x1080.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EtLW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17defc1c-ee2d-4efc-ba76-a234bbd42ad5_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/17defc1c-ee2d-4efc-ba76-a234bbd42ad5_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:135226,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17defc1c-ee2d-4efc-ba76-a234bbd42ad5_1920x1080.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!EtLW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17defc1c-ee2d-4efc-ba76-a234bbd42ad5_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!EtLW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17defc1c-ee2d-4efc-ba76-a234bbd42ad5_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!EtLW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17defc1c-ee2d-4efc-ba76-a234bbd42ad5_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!EtLW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17defc1c-ee2d-4efc-ba76-a234bbd42ad5_1920x1080.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">I kind of wanted to do a Donkey Kong Bananza bit with each section representing a different sublayer but I truly did not think enough people would get the reference. </figcaption></figure></div><h1>Journey to the centre of the &#128046; </h1><h4>(yes we&#8217;re really going through all these)</h4><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/what-is">What is &#128046;?</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/value-and-reference-semantics">Value and reference semantics</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/in-the-swift-standard-library">&#128046; In the Swift Standard Library</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/implementing">Implementing &#128046;</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/the-swift-standard-library">The Swift Standard Library</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/builtins">Builtins</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/interlude-the-swift-compiler">(Interlude) The Swift Compiler</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/our-isknownuniquelyreferenced-compass">Our isKnownUniquelyReferenced Compass</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/the-abstract-syntax-tree">The Abstract Syntax Tree</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/builtins-on-the-ast">Builtins on the AST</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/synthesising-a-builtin-function">Synthesising a Builtin Function</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/the-builtin-module">The Builtin Module</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/ast-recap">AST Recap</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/swift-intermediate-language">Swift Intermediate Language</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/llvm-intermediate-representation">LLVM Intermediate Representation</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/the-swift-runtime">The Swift Runtime</a></p><ul><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/checking-the-docs">Checking the Docs</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/swift-object">SwiftObject</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/heapobject">HeapObject</a></p></li></ul></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/swiftshims">SwiftShims</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/the-isknownuniquelyreferenced-meme">The </a><strong><a href="https://blog.jacobstechtavern.com/i/181220219/the-isknownuniquelyreferenced-meme">isKnownUniquelyReferenced</a></strong><a href="https://blog.jacobstechtavern.com/i/181220219/the-isknownuniquelyreferenced-meme"> Meme</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/i/181220219/last-orders">Last Orders</a></p></li></ul><div><hr></div><h1><strong>What is &#128046;?</strong></h1><p>For anyone who hasn&#8217;t brushed up on their interview prep recently: </p><p>&#128046; optimises the performance of a Swift struct to get the best of both worlds: </p><ul><li><p>easy-to-reason-about value semantics.</p></li><li><p>low memory overhead from reference semantics.</p></li></ul><p><em>&#8220;Uhh, I just said I <strong>wasn&#8217;t</strong> doing interviews, can you not drop terms like &#8220;reference semantics&#8221; as if I remember what they are?&#8221; </em>I hear you say from the future.</p><p>Right. Sorry. </p><div><hr></div><h2><strong>Value and reference semantics</strong></h2><p><strong>Value semantics</strong> = copies are independent entities </p><p><strong>Reference semantics</strong> = copies point to the same underlying memory on the heap</p><p>structs that utilise &#128046; store their data in a memory buffer on the heap.</p><p>When the struct is copied, all the properties are copied, including the 64-bit pointer to the backing data, referencing the memory address <strong>0x00000000d34db33f</strong>. </p><p>This is a <em>shallow copy</em>. Each copy of the reference still points to the same underling memory. This underlying memory is shared. <em>This</em> is reference semantics.</p><p>When the value of the data on a copy of a &#128046; struct changes, value semantics kick in.</p><p>The struct allocates a new buffer of memory on the heap, copies the updated data there, then points at the new buffer. A <em>deep copy</em>. It leaves the original memory block, and other instances of the struct pointing to it, unchanged.</p><div><hr></div><h2><strong>&#128046; In the Swift Standard Library</strong></h2><p>Many fundamental types in the Swift Standard Library utilise the &#128046; (copy-on-write) optimisation:</p><ul><li><p><a href="https://github.com/swiftlang/swift/blob/main/stdlib/public/core/Array.swift">Array</a></p></li><li><p><a href="https://github.com/swiftlang/swift/blob/main/stdlib/public/core/Set.swift">Set</a></p></li><li><p><a href="https://github.com/swiftlang/swift/blob/main/stdlib/public/core/Dictionary.swift">Dictionary</a></p></li><li><p><a href="https://github.com/swiftlang/swift/blob/main/stdlib/public/core/String.swift">String</a></p></li><li><p><a href="https://blog.jacobstechtavern.com/p/data-deep-dive">Data</a> (actually an impostor from Foundation, but it&#8217;s one of the gang).</p></li></ul><p>When using these data structures in your code, or even types that contain them, you reap the benefits of the underlying &#128046; optimisation for free. </p><p>But it&#8217;s possible to implement &#128046; in your own types, too!</p><div><hr></div><h1><strong>Implementing &#128046;</strong></h1><p>Very senior iOS engineers will tell you how you can implement your own types that utilise &#128046;. Check out this sample robbed straight from Apple&#8217;s <a href="https://github.com/apple/swift/blob/main/docs/OptimizationTips.rst#advice-use-copy-on-write-semantics-for-large-values">Swift Optimisation Tips</a>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vVll!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe53308-29d0-4f96-b41e-8ae323c3890b_1240x1196.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vVll!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe53308-29d0-4f96-b41e-8ae323c3890b_1240x1196.png 424w, https://substackcdn.com/image/fetch/$s_!vVll!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe53308-29d0-4f96-b41e-8ae323c3890b_1240x1196.png 848w, https://substackcdn.com/image/fetch/$s_!vVll!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe53308-29d0-4f96-b41e-8ae323c3890b_1240x1196.png 1272w, https://substackcdn.com/image/fetch/$s_!vVll!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe53308-29d0-4f96-b41e-8ae323c3890b_1240x1196.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vVll!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe53308-29d0-4f96-b41e-8ae323c3890b_1240x1196.png" width="1240" height="1196" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cbe53308-29d0-4f96-b41e-8ae323c3890b_1240x1196.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1196,&quot;width&quot;:1240,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:226666,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe53308-29d0-4f96-b41e-8ae323c3890b_1240x1196.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vVll!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe53308-29d0-4f96-b41e-8ae323c3890b_1240x1196.png 424w, https://substackcdn.com/image/fetch/$s_!vVll!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe53308-29d0-4f96-b41e-8ae323c3890b_1240x1196.png 848w, https://substackcdn.com/image/fetch/$s_!vVll!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe53308-29d0-4f96-b41e-8ae323c3890b_1240x1196.png 1272w, https://substackcdn.com/image/fetch/$s_!vVll!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe53308-29d0-4f96-b41e-8ae323c3890b_1240x1196.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In short, you place your struct, <strong>T</strong>, in <strong>Box</strong>. </p><p><strong>Box</strong> wraps <strong>T</strong> in a reference, <strong>Ref</strong>, placing the structure on the heap.</p><p>You can <em>read</em> the value inside <strong>Box</strong> trivially.</p><p>When you <em>write</em> the value, we check if the memory inside <strong>Ref</strong> is uniquely referenced, that is, if there is <strong>only one pointer</strong> to this instance. If it is unique, the value mutates in-place. Otherwise, the heap memory buffer under <strong>Ref</strong> is copied into a new address before mutation. The <strong>Ref</strong> pointer inside <strong>Box</strong> changes to point to this new address.</p><blockquote><p><em>This illustrative example shows how <strong>isKnownUniquelyReferenced</strong> can be used to implement &#128046;, but it&#8217;s kind</em> <em>of sh*tty for real life code: you&#8217;re polluting your type with slower reference access semantics to make copying a bit more efficient. </em></p><p><em>It&#8217;s only a good idea when copying is expected and there is enough memory that it makes sense to place it on the heap.</em></p></blockquote><p>A mysterious function, <strong>isKnownUniquelyReferenced</strong>, is the secret sauce that makes this optimisation possible.</p><blockquote><p><em>As it turns out, it&#8217;s fucking mysterious, because I originally spent about 3 weeks traversing megabytes of C++ (in 2023, before AI tooling could even touch this kind of task) to understand what the hell it was doing.</em> </p></blockquote><div><hr></div><h1><strong>The Swift Standard Library</strong></h1><p>First things first.</p><p>Let&#8217;s download <a href="https://github.com/apple/swift">the Swift source code</a>, search for isKnownUniquelyReferenced, and take a gander at the implementation.</p><p>Or, you can just CMD+Click that bad boy in Xcode.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8nt9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fe13ac1-c807-4a94-b6d8-f617350c2ae1_1968x1282.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8nt9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fe13ac1-c807-4a94-b6d8-f617350c2ae1_1968x1282.png 424w, https://substackcdn.com/image/fetch/$s_!8nt9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fe13ac1-c807-4a94-b6d8-f617350c2ae1_1968x1282.png 848w, https://substackcdn.com/image/fetch/$s_!8nt9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fe13ac1-c807-4a94-b6d8-f617350c2ae1_1968x1282.png 1272w, https://substackcdn.com/image/fetch/$s_!8nt9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fe13ac1-c807-4a94-b6d8-f617350c2ae1_1968x1282.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8nt9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fe13ac1-c807-4a94-b6d8-f617350c2ae1_1968x1282.png" width="1456" height="948" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8fe13ac1-c807-4a94-b6d8-f617350c2ae1_1968x1282.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:948,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:773599,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fe13ac1-c807-4a94-b6d8-f617350c2ae1_1968x1282.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8nt9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fe13ac1-c807-4a94-b6d8-f617350c2ae1_1968x1282.png 424w, https://substackcdn.com/image/fetch/$s_!8nt9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fe13ac1-c807-4a94-b6d8-f617350c2ae1_1968x1282.png 848w, https://substackcdn.com/image/fetch/$s_!8nt9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fe13ac1-c807-4a94-b6d8-f617350c2ae1_1968x1282.png 1272w, https://substackcdn.com/image/fetch/$s_!8nt9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fe13ac1-c807-4a94-b6d8-f617350c2ae1_1968x1282.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>It&#8217;s holed up in <a href="https://github.com/swiftlang/swift/blob/main/stdlib/public/core/ManagedBuffer.swift">ManagedBuffer.swift</a>, underneath the definition of <strong>ManagedBufferPointer</strong>. I don&#8217;t love putting global functions in the same file as semi-related data structures, but who am I to question the wisdom of our Cupertinoverlords?</p><p>Here&#8217;s the implementation of <strong>isKnownUniquelyReferenced</strong> I&#8217;ve been searching for in all its glory:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hl0V!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b7e0a38-853a-4387-b8a2-34107ba1d62a_1816x492.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hl0V!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b7e0a38-853a-4387-b8a2-34107ba1d62a_1816x492.png 424w, https://substackcdn.com/image/fetch/$s_!hl0V!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b7e0a38-853a-4387-b8a2-34107ba1d62a_1816x492.png 848w, https://substackcdn.com/image/fetch/$s_!hl0V!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b7e0a38-853a-4387-b8a2-34107ba1d62a_1816x492.png 1272w, https://substackcdn.com/image/fetch/$s_!hl0V!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b7e0a38-853a-4387-b8a2-34107ba1d62a_1816x492.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hl0V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b7e0a38-853a-4387-b8a2-34107ba1d62a_1816x492.png" width="1456" height="394" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1b7e0a38-853a-4387-b8a2-34107ba1d62a_1816x492.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:394,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:156456,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b7e0a38-853a-4387-b8a2-34107ba1d62a_1816x492.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hl0V!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b7e0a38-853a-4387-b8a2-34107ba1d62a_1816x492.png 424w, https://substackcdn.com/image/fetch/$s_!hl0V!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b7e0a38-853a-4387-b8a2-34107ba1d62a_1816x492.png 848w, https://substackcdn.com/image/fetch/$s_!hl0V!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b7e0a38-853a-4387-b8a2-34107ba1d62a_1816x492.png 1272w, https://substackcdn.com/image/fetch/$s_!hl0V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b7e0a38-853a-4387-b8a2-34107ba1d62a_1816x492.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>All in a day&#8217;s work. </p><p>I&#8217;ll head to the pub now for a well-deserved beverage. </p><div><hr></div><h1><strong>Builtins</strong></h1><p>I&#8217;ve got my beer!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!umY2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118259db-8487-4d9e-a0e0-7baafc98246c.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!umY2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118259db-8487-4d9e-a0e0-7baafc98246c.heic 424w, https://substackcdn.com/image/fetch/$s_!umY2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118259db-8487-4d9e-a0e0-7baafc98246c.heic 848w, https://substackcdn.com/image/fetch/$s_!umY2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118259db-8487-4d9e-a0e0-7baafc98246c.heic 1272w, https://substackcdn.com/image/fetch/$s_!umY2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118259db-8487-4d9e-a0e0-7baafc98246c.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!umY2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118259db-8487-4d9e-a0e0-7baafc98246c.heic" width="1456" height="1092" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/118259db-8487-4d9e-a0e0-7baafc98246c.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1092,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2146953,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118259db-8487-4d9e-a0e0-7baafc98246c.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!umY2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118259db-8487-4d9e-a0e0-7baafc98246c.heic 424w, https://substackcdn.com/image/fetch/$s_!umY2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118259db-8487-4d9e-a0e0-7baafc98246c.heic 848w, https://substackcdn.com/image/fetch/$s_!umY2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118259db-8487-4d9e-a0e0-7baafc98246c.heic 1272w, https://substackcdn.com/image/fetch/$s_!umY2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118259db-8487-4d9e-a0e0-7baafc98246c.heic 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Uh, I suppose I don&#8217;t have much else on.</p><p>Perhaps we can dive a little bit deeper and find out what <strong>_isUnique</strong> is doing.</p><p>Much deeper. Including <em>Builtins, The Swift Compiler, The Abstract Syntax Tree, Swift Intermediate Language, LLVM Intermediate Representation, The Swift Runtime, SwiftShims, </em>and <em>The <strong>isKnownUniquelyReferenced</strong> Meme.</em></p><div><hr></div><p>We find <strong>_isUnique</strong> defined pretty close by in Builtin.swift:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bynU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80ee4e31-538d-41f3-afdc-97da113c2136_1528x624.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bynU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80ee4e31-538d-41f3-afdc-97da113c2136_1528x624.png 424w, https://substackcdn.com/image/fetch/$s_!bynU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80ee4e31-538d-41f3-afdc-97da113c2136_1528x624.png 848w, https://substackcdn.com/image/fetch/$s_!bynU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80ee4e31-538d-41f3-afdc-97da113c2136_1528x624.png 1272w, https://substackcdn.com/image/fetch/$s_!bynU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80ee4e31-538d-41f3-afdc-97da113c2136_1528x624.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bynU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80ee4e31-538d-41f3-afdc-97da113c2136_1528x624.png" width="1456" height="595" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/80ee4e31-538d-41f3-afdc-97da113c2136_1528x624.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:595,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:202957,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80ee4e31-538d-41f3-afdc-97da113c2136_1528x624.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bynU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80ee4e31-538d-41f3-afdc-97da113c2136_1528x624.png 424w, https://substackcdn.com/image/fetch/$s_!bynU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80ee4e31-538d-41f3-afdc-97da113c2136_1528x624.png 848w, https://substackcdn.com/image/fetch/$s_!bynU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80ee4e31-538d-41f3-afdc-97da113c2136_1528x624.png 1272w, https://substackcdn.com/image/fetch/$s_!bynU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80ee4e31-538d-41f3-afdc-97da113c2136_1528x624.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><blockquote><p><em>Loving the doc comments from Apple; let&#8217;s as an industry strive for more quantum physics references in our source code!</em></p></blockquote><p>We need to find out what this <strong>Builtin.isUnique(&amp;object)</strong> guy is trying to do.</p><p>This is where things get interesting.</p><p>We find this Builtin function defined somewhere totally different: <strong><a href="https://github.com/swiftlang/swift/blob/main/include/swift/AST/Builtins.def#L4">Builtins.def</a></strong>.</p><pre><code><code>BUILTIN_SIL_OPERATION(IsUnique, "isUnique", Special)</code></code></pre><p>Why is this located in <strong>include/AST</strong>? What is a SIL operation? Huh???</p><p>Before we can progress any further, we need to understand a bit of theory about the Swift Compiler and its dad, LLVM.</p><div><hr></div><h1><strong>(Interlude) The Swift Compiler</strong></h1><p><a href="https://www.swift.org/swift-compiler/">The Swift Compiler</a> processes Swift source code files into efficient machine code. It&#8217;s a pipeline with several Swift-specific optimisation stages.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!buND!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3f46d9-1601-47a7-b4fb-425bb8189e40_1400x709.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!buND!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3f46d9-1601-47a7-b4fb-425bb8189e40_1400x709.png 424w, https://substackcdn.com/image/fetch/$s_!buND!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3f46d9-1601-47a7-b4fb-425bb8189e40_1400x709.png 848w, https://substackcdn.com/image/fetch/$s_!buND!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3f46d9-1601-47a7-b4fb-425bb8189e40_1400x709.png 1272w, https://substackcdn.com/image/fetch/$s_!buND!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3f46d9-1601-47a7-b4fb-425bb8189e40_1400x709.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!buND!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3f46d9-1601-47a7-b4fb-425bb8189e40_1400x709.png" width="1400" height="709" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5a3f46d9-1601-47a7-b4fb-425bb8189e40_1400x709.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:709,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!buND!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3f46d9-1601-47a7-b4fb-425bb8189e40_1400x709.png 424w, https://substackcdn.com/image/fetch/$s_!buND!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3f46d9-1601-47a7-b4fb-425bb8189e40_1400x709.png 848w, https://substackcdn.com/image/fetch/$s_!buND!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3f46d9-1601-47a7-b4fb-425bb8189e40_1400x709.png 1272w, https://substackcdn.com/image/fetch/$s_!buND!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3f46d9-1601-47a7-b4fb-425bb8189e40_1400x709.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Swift compilation process: Image from <a href="https://academy.realm.io/posts/tryswift-jesse-squires-contributing-open-source-swift/">Jesse Squires on Realm Academy</a></figcaption></figure></div><p>Let&#8217;s get our heads around each step in some detail:</p><ol><li><p><code>.swift</code> files are <a href="https://github.com/apple/swift/tree/main/lib/Parse">parsed</a> and turned into a data structure known as an Abstract Syntax Tree (<a href="https://github.com/apple/swift/tree/main/lib/AST">AST</a>), making it easy for algorithms to traverse.</p></li><li><p><a href="https://github.com/apple/swift/tree/main/lib/Sema">Semantic analysis</a> is performed on the AST, performing tasks such as type-checking, evaluating protocol conformance, and checking variable scopes.</p></li><li><p>Swift Intermediate Language (<a href="https://github.com/apple/swift/tree/main/lib/SIL">SIL</a>) is generated from the AST. This is a halfway point between raw Swift code and the low-level LLVM machine code.</p></li><li><p>This SIL is <a href="https://github.com/apple/swift/tree/main/lib/SILOptimizer">optimised</a> through various passes. ARC is optimised, generics are specialised, code is inlined, and devirtualization <a href="https://blog.jacobstechtavern.com/p/swift-method-dispatch">replaces dynamic dispatch</a>. </p></li><li><p>Optimised SIL is transformed into <a href="https://github.com/apple/swift/tree/main/lib/IRGen">LLVM IR</a> (Intermediate Representation). This is a high-level, language-independent kind of assembly language.</p></li><li><p>LLVM is a compiler toolchain: a frontend that processes any language into IR, and a backend that translates IR into machine instructions for any CPU. LLVM runs multiple <a href="https://github.com/apple/swift/tree/main/lib/LLVMPasses">optimisation passes</a> on IR, enhancing performance for the target CPU.</p></li><li><p>The LLVM backend transforms the LLVM IR into actual machine code and produces object <code>.o</code> files. <a href="https://blog.jacobstechtavern.com/p/reverse-engineer-private-frameworks">These contain these assembly instructions, metadata, strings, and debug information</a>.</p></li><li><p>In the final compilation step, the Linker combines various object files with libraries into a single executable, which the OS can load to run a Swift application.</p></li></ol><blockquote><p><em>I go into way more detail here:</em></p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;dadc4471-95dd-4c64-8e96-a9d1bef18bd7&quot;,&quot;caption&quot;:&quot;The Swift language was created by Chris Lattner. Before he ran the Xcode and compiler teams at Apple, he built LLVM at age 23. That&#8217;s right. Chris is pretty much Impostor Syndrome: The Movie.&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;md&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;The Swift Compiler &quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:126930235,&quot;name&quot;:&quot;Jacob Bartlett&quot;,&quot;bio&quot;:&quot;Master iOS. Boost your salary. Join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week. Sign up free today!&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!s80e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feab1e065-dffc-4096-ad9e-826ddda8a6cd_1304x1304.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100}],&quot;post_date&quot;:&quot;2024-12-24T17:23:26.623Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7cbceb79-2853-49cc-8186-cb8c4528a6d5_1680x1200.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.jacobstechtavern.com/p/the-swift-compiler&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:152589844,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:20,&quot;comment_count&quot;:0,&quot;publication_id&quot;:1376173,&quot;publication_name&quot;:&quot;Jacob&#8217;s Tech Tavern&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LJp-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee402e25-4e20-4683-ba5f-20ca86eb2b43_512x512.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div></blockquote><div><hr></div><h2>Our isKnownUniquelyReferenced Compass</h2><p>With that substantial segue completed, let&#8217;s return to our isKnownUniquelyReferenced deep-dive.</p><p>Now that we understand how the Swift Compiler works, we have a compass with which to orient ourselves while we dredge the depths of the Swift source code.</p><p>Instead of inspecting the 859 individual instances of isUnique we find when we CMF+F the Swift codebase, we can:</p><ol><li><p>Find out how the isUnique Builtin function is applied to the Abstract Syntax Tree.</p></li><li><p>Work out how isUnique looks when it is transformed into SIL (Swift Intermediate Language).</p></li><li><p>Determine how isUnique behaves when converted to LLVM Intermediate Representation.</p></li><li><p>Understand how these low-level instructions check whether an object is uniquely referenced.</p></li></ol><p><em>(I didn&#8217;t know this at the time, but this only took me halfway).</em></p><div><hr></div><h1><strong>The Abstract Syntax Tree</strong></h1><p>Last time we left off, we found the Builtin declaration for the isUnique method in the AST/ folder, Builtins.def:</p><pre><code><code>/// isUnique only returns true for non-null, native swift object
/// references with a strong reference count of one.
BUILTIN_SIL_OPERATION(IsUnique, "isUnique", Special)</code></code></pre><p>.def files contain exported C++ macro definitions. Think of them like header files. </p><p>The <strong>include/</strong> folder defines a public interface to the Swift Compiler, which is made available to <strong>stdlib/</strong>, the Swift Standard Library.</p><div><hr></div><h2><strong>Builtins on the AST</strong></h2><p>First, we need to work out how the Builtin isUnique function gets applied to the Abstract Syntax Tree.</p><p>We find the Builtin being synthesised here in <strong>Builtins.cpp</strong>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lyGc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc510c6e1-4aab-4486-acc8-991eed2e0c7e_1716x976.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lyGc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc510c6e1-4aab-4486-acc8-991eed2e0c7e_1716x976.png 424w, https://substackcdn.com/image/fetch/$s_!lyGc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc510c6e1-4aab-4486-acc8-991eed2e0c7e_1716x976.png 848w, https://substackcdn.com/image/fetch/$s_!lyGc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc510c6e1-4aab-4486-acc8-991eed2e0c7e_1716x976.png 1272w, https://substackcdn.com/image/fetch/$s_!lyGc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc510c6e1-4aab-4486-acc8-991eed2e0c7e_1716x976.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lyGc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc510c6e1-4aab-4486-acc8-991eed2e0c7e_1716x976.png" width="1456" height="828" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c510c6e1-4aab-4486-acc8-991eed2e0c7e_1716x976.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:828,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:296668,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc510c6e1-4aab-4486-acc8-991eed2e0c7e_1716x976.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lyGc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc510c6e1-4aab-4486-acc8-991eed2e0c7e_1716x976.png 424w, https://substackcdn.com/image/fetch/$s_!lyGc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc510c6e1-4aab-4486-acc8-991eed2e0c7e_1716x976.png 848w, https://substackcdn.com/image/fetch/$s_!lyGc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc510c6e1-4aab-4486-acc8-991eed2e0c7e_1716x976.png 1272w, https://substackcdn.com/image/fetch/$s_!lyGc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc510c6e1-4aab-4486-acc8-991eed2e0c7e_1716x976.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Several methods show up here: <strong>IsUnique</strong>, <strong>IsUnique_native</strong> (with extra safety checks), and <strong>BeginCOWMutation</strong>, which the Swift Standard Library uses to internally implement &#128046; for Array, ArraySlice and ContiguousArray.</p><p>These variants all produce the same getIsUniqueOperation, hung like so many baubles onto the AST (abstract syntax tree). This itself calls <strong>getBuiltinFunction</strong> to return a pointer to a <strong>ValueDecl</strong>, which represents a function signature.</p><blockquote><p><em>You&#8217;ll notice the function signature returns Int1, a single-bit Integer. This is actually the underlying &#8220;Builtin&#8221; backing store used to implement the Swift Bool!</em></p></blockquote><div><hr></div><h2><strong>Synthesising a Builtin Function</strong></h2><p><strong>getBuiltinFunction</strong> is actually implemented in this same file:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uO9_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff216f474-541c-4dba-8363-d78020239bc9_1738x2032.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uO9_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff216f474-541c-4dba-8363-d78020239bc9_1738x2032.png 424w, https://substackcdn.com/image/fetch/$s_!uO9_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff216f474-541c-4dba-8363-d78020239bc9_1738x2032.png 848w, https://substackcdn.com/image/fetch/$s_!uO9_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff216f474-541c-4dba-8363-d78020239bc9_1738x2032.png 1272w, https://substackcdn.com/image/fetch/$s_!uO9_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff216f474-541c-4dba-8363-d78020239bc9_1738x2032.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uO9_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff216f474-541c-4dba-8363-d78020239bc9_1738x2032.png" width="1456" height="1702" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f216f474-541c-4dba-8363-d78020239bc9_1738x2032.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1702,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:519731,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff216f474-541c-4dba-8363-d78020239bc9_1738x2032.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uO9_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff216f474-541c-4dba-8363-d78020239bc9_1738x2032.png 424w, https://substackcdn.com/image/fetch/$s_!uO9_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff216f474-541c-4dba-8363-d78020239bc9_1738x2032.png 848w, https://substackcdn.com/image/fetch/$s_!uO9_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff216f474-541c-4dba-8363-d78020239bc9_1738x2032.png 1272w, https://substackcdn.com/image/fetch/$s_!uO9_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff216f474-541c-4dba-8363-d78020239bc9_1738x2032.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><blockquote><p><em>With most code samples in this article, I&#8217;ve stripped out most of the code to make the key moving parts clearer, but feel free to <a href="https://github.com/apple/swift/blob/main/lib/AST/Builtins.cpp">look at the full source yourself</a>. There&#8217;s still a whole bunch of code, so I apologise for my crappy redaction. </em></p></blockquote><p>There are 3 critical steps to follow here:</p><ol><li><p>A reference to the <strong>Builtin</strong> module is retrieved from the <strong>ctx</strong>, the AST context, a repository of shared information the compiler uses to generate functions.</p></li><li><p>The generic inout parameter for <strong>isUnique</strong> and the result type, <strong>Int1</strong>, are defined here, to synthesise the signature of the <strong>FuncDecl</strong>.</p></li><li><p><strong>id</strong>, the Builtin function identifier, is used to synthesise the function declaration we want from the Builtin module, i.e. <strong>IsUnique</strong>.</p></li></ol><p>In summary, a FuncDecl, a function declaration, is synthesised. This implements the <strong>isUnique</strong> method on the Builtin module, and gets hung on the Abstract Syntax Tree.</p><p>All this processing allows Builtins to behave just like regular Swift functions.</p><div><hr></div><h2><code>T</code>he Builtin Module</h2><p>Swift&#8217;s Builtin module itself contains a set of low-level functions and operations that map to LLVM IR instructions, bypassing Swift&#8217;s ordinary type safety mechanisms.</p><p>As we have seen, Builtins are used extensively in the Standard Library for performance, but Apple doesn&#8217;t trust us mere mortals to utilise them ourselves.</p><p>To be honest, I&#8217;m 2 Hepcats deep at the pub, and I wouldn&#8217;t trust me either.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eWIz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff11ecbdd-d54e-4174-8243-c36871e39f55.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eWIz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff11ecbdd-d54e-4174-8243-c36871e39f55.heic 424w, https://substackcdn.com/image/fetch/$s_!eWIz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff11ecbdd-d54e-4174-8243-c36871e39f55.heic 848w, https://substackcdn.com/image/fetch/$s_!eWIz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff11ecbdd-d54e-4174-8243-c36871e39f55.heic 1272w, https://substackcdn.com/image/fetch/$s_!eWIz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff11ecbdd-d54e-4174-8243-c36871e39f55.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eWIz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff11ecbdd-d54e-4174-8243-c36871e39f55.heic" width="1456" height="1092" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f11ecbdd-d54e-4174-8243-c36871e39f55.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1092,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3002685,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff11ecbdd-d54e-4174-8243-c36871e39f55.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eWIz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff11ecbdd-d54e-4174-8243-c36871e39f55.heic 424w, https://substackcdn.com/image/fetch/$s_!eWIz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff11ecbdd-d54e-4174-8243-c36871e39f55.heic 848w, https://substackcdn.com/image/fetch/$s_!eWIz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff11ecbdd-d54e-4174-8243-c36871e39f55.heic 1272w, https://substackcdn.com/image/fetch/$s_!eWIz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff11ecbdd-d54e-4174-8243-c36871e39f55.heic 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><em><a href="https://gipsyhillbrew.com/product/hepcat-2">Gipsy Hill brewery</a>, pls sponsor my Substack, I&#8217;ll send you my media kit, you can pay me in beer.</em></figcaption></figure></div><div><hr></div><h2><strong>AST Recap</strong></h2><p>Let&#8217;s recap on our progress so far:</p><p><strong>isKnownUniquelyReferenced</strong> calls an internal <strong>isUnique</strong> method, which uses a <strong>Builtin</strong> method, a special low-level function implemented inside the compiler.</p><p>When Swift code compiles, <strong>Builtin.isUnique</strong> plops straight onto the AST. Indistinguishable from a run-of-the-mill Swift function. Later compilation stages treat it as such, but ultimately it maps to a dedicated instruction.</p><p>What happens to this Builtin function next? How does the resulting low-level instruction check the reference count?</p><p>To truly find out, <em>we need to go deeper</em>.</p><p>Let&#8217;s check our compass.</p><p>Next stop?</p><p>SIL.</p><div><hr></div><h1><strong>Swift Intermediate Language</strong></h1><p>After constructing an Abstract Syntax Tree and synthesising Builtin function declarations, the Swift Compiler converts your code into Swift Intermediate Language. SIL is the precursor to LLVM IR, which itself undergoes multiple very cool Swift-specific optimisation passes.</p><p>In our journey to find out how the <strong>isUnique</strong> Builtin is working, the obvious first port of call is the SIL Generation library, and specifically, <strong>SILGenBuiltin.cpp</strong>. It&#8217;s not easy to find the right function calls. Naming is a bit jank between compiler steps.</p><p>This function looks&#8230; about right:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wUoY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45625e60-87bc-492b-90da-525f2b562a68_1604x756.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wUoY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45625e60-87bc-492b-90da-525f2b562a68_1604x756.png 424w, https://substackcdn.com/image/fetch/$s_!wUoY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45625e60-87bc-492b-90da-525f2b562a68_1604x756.png 848w, https://substackcdn.com/image/fetch/$s_!wUoY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45625e60-87bc-492b-90da-525f2b562a68_1604x756.png 1272w, https://substackcdn.com/image/fetch/$s_!wUoY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45625e60-87bc-492b-90da-525f2b562a68_1604x756.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wUoY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45625e60-87bc-492b-90da-525f2b562a68_1604x756.png" width="1456" height="686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/45625e60-87bc-492b-90da-525f2b562a68_1604x756.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:686,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:213278,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45625e60-87bc-492b-90da-525f2b562a68_1604x756.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wUoY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45625e60-87bc-492b-90da-525f2b562a68_1604x756.png 424w, https://substackcdn.com/image/fetch/$s_!wUoY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45625e60-87bc-492b-90da-525f2b562a68_1604x756.png 848w, https://substackcdn.com/image/fetch/$s_!wUoY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45625e60-87bc-492b-90da-525f2b562a68_1604x756.png 1272w, https://substackcdn.com/image/fetch/$s_!wUoY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45625e60-87bc-492b-90da-525f2b562a68_1604x756.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><blockquote><p><em>Only 10 lines this time. I&#8217;m learning. As before, I&#8217;ve left out numerous lines of C++ assertions (mostly nullability checks) to make the code easier to follow.</em></p></blockquote><p>This <strong>emitBuiltinIsUnique</strong> method, naturally, emits the SIL instructions for the Builtin function <strong>isUnique</strong>. </p><p>Following <strong>createIsUnique</strong> further, we find it defined in <strong>include/</strong> inside <strong>SILBuilder.h</strong>, which acts as the public interface for SIL:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LRhI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef4f361-8f4c-4552-aee6-8813368e7455_1662x536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LRhI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef4f361-8f4c-4552-aee6-8813368e7455_1662x536.png 424w, https://substackcdn.com/image/fetch/$s_!LRhI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef4f361-8f4c-4552-aee6-8813368e7455_1662x536.png 848w, https://substackcdn.com/image/fetch/$s_!LRhI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef4f361-8f4c-4552-aee6-8813368e7455_1662x536.png 1272w, https://substackcdn.com/image/fetch/$s_!LRhI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef4f361-8f4c-4552-aee6-8813368e7455_1662x536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LRhI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef4f361-8f4c-4552-aee6-8813368e7455_1662x536.png" width="1456" height="470" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3ef4f361-8f4c-4552-aee6-8813368e7455_1662x536.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:470,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:184373,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef4f361-8f4c-4552-aee6-8813368e7455_1662x536.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LRhI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef4f361-8f4c-4552-aee6-8813368e7455_1662x536.png 424w, https://substackcdn.com/image/fetch/$s_!LRhI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef4f361-8f4c-4552-aee6-8813368e7455_1662x536.png 848w, https://substackcdn.com/image/fetch/$s_!LRhI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef4f361-8f4c-4552-aee6-8813368e7455_1662x536.png 1272w, https://substackcdn.com/image/fetch/$s_!LRhI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ef4f361-8f4c-4552-aee6-8813368e7455_1662x536.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>C++ header files often inline their methods. <strong>createIsUnique </strong>method, in arcane C++ syntax, instantiates an instance of the type <strong>IsUniqueInst</strong>. Inst, in this context, meaning <em>instruction</em>, not instance. </p><blockquote><p><em>Uh, perhaps I structured the above paragraph pretty badly.</em></p></blockquote><p>We locate the class declaration for <strong>IsUniqueInst</strong> at <strong>SILInstruction.h</strong>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PTcd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eba730e-1436-4225-992b-a4c0deb49bae_1738x756.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PTcd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eba730e-1436-4225-992b-a4c0deb49bae_1738x756.png 424w, https://substackcdn.com/image/fetch/$s_!PTcd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eba730e-1436-4225-992b-a4c0deb49bae_1738x756.png 848w, https://substackcdn.com/image/fetch/$s_!PTcd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eba730e-1436-4225-992b-a4c0deb49bae_1738x756.png 1272w, https://substackcdn.com/image/fetch/$s_!PTcd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eba730e-1436-4225-992b-a4c0deb49bae_1738x756.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PTcd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eba730e-1436-4225-992b-a4c0deb49bae_1738x756.png" width="1456" height="633" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8eba730e-1436-4225-992b-a4c0deb49bae_1738x756.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:633,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:242366,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eba730e-1436-4225-992b-a4c0deb49bae_1738x756.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PTcd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eba730e-1436-4225-992b-a4c0deb49bae_1738x756.png 424w, https://substackcdn.com/image/fetch/$s_!PTcd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eba730e-1436-4225-992b-a4c0deb49bae_1738x756.png 848w, https://substackcdn.com/image/fetch/$s_!PTcd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eba730e-1436-4225-992b-a4c0deb49bae_1738x756.png 1272w, https://substackcdn.com/image/fetch/$s_!PTcd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eba730e-1436-4225-992b-a4c0deb49bae_1738x756.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>IsUniqueInst</strong> ultimately defines the Swift Intermediate Language instruction, which checks whether an object on the heap is uniquely referenced. This SIL instruction is now ready for optimisation passes and eventual conversion into LLVM IR.</p><blockquote><p><em>Desperate to learn more about Swift Intermediate Language? Check out my O.G. Elite Hack, my first every foray into paid content, where I go way deeper on what it does for Swift.</em></p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;2d34f2ef-278f-4d06-a1bc-24465c61ef70&quot;,&quot;caption&quot;:&quot;The Swift Compiler is a mysterious multi-headed hydra. It takes your code through a many-step journey from hello world to machine code:&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;md&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Swift Intermediate Language&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:126930235,&quot;name&quot;:&quot;Jacob Bartlett&quot;,&quot;bio&quot;:&quot;Master iOS. Boost your salary. Join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week. Sign up free today!&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!s80e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feab1e065-dffc-4096-ad9e-826ddda8a6cd_1304x1304.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100}],&quot;post_date&quot;:&quot;2024-09-16T16:14:08.291Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!rWLs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94f331c7-b580-4c9b-947b-78da0d2dd84c_1024x1024.webp&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.jacobstechtavern.com/p/swift-intermediate-language&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:148933610,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:10,&quot;comment_count&quot;:0,&quot;publication_id&quot;:1376173,&quot;publication_name&quot;:&quot;Jacob&#8217;s Tech Tavern&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LJp-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee402e25-4e20-4683-ba5f-20ca86eb2b43_512x512.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div></blockquote><p>Let&#8217;s make this simple: we haven&#8217;t worked out how the uniqueness checks are happening yet. </p><p>The key to searching through the compiler is all about <strong>maintaining your bearings as you traverse each layer</strong>, down towards low-level instructions and runtime ABI calls. Usually, the runtime that has what we&#8217;re looking for. We&#8217;ll get to that, bear with me.</p><div><hr></div><h1><strong>LLVM Intermediate Representation</strong></h1><p>Chris Lattner, creator of LLVM and Swift, apocryphally called Swift <em>&#8220;syntactic sugar for LLVM.&#8221;</em></p><p>After parsing the Abstract Syntax Tree and Swift Intermediate Language generation, we arrive at the lowest level of the Swift frontend to LLVM: Synthesising instructions in LLVM Intermediate Representation. </p><p>LLVM IR is a language-independent, high-level assembly language around which LLVM itself is designed. The LLVM toolchain optimises this IR for any CPU instruction set architecture you want to run your code on.</p><p>After searching through <strong>lib/IRGen/</strong>, the library for generating LLVM IR, we spot a familiar-looking declaration in <strong>IRGenSIL.cpp</strong>: this time, taking in an SIL instruction as an argument and emitting LLVM IR for the <strong>isUnique</strong> Builtin function:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oWaO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8759b5-64cb-4ae8-9d9c-a8dd9723dbd7_1796x712.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oWaO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8759b5-64cb-4ae8-9d9c-a8dd9723dbd7_1796x712.png 424w, https://substackcdn.com/image/fetch/$s_!oWaO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8759b5-64cb-4ae8-9d9c-a8dd9723dbd7_1796x712.png 848w, https://substackcdn.com/image/fetch/$s_!oWaO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8759b5-64cb-4ae8-9d9c-a8dd9723dbd7_1796x712.png 1272w, https://substackcdn.com/image/fetch/$s_!oWaO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8759b5-64cb-4ae8-9d9c-a8dd9723dbd7_1796x712.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oWaO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8759b5-64cb-4ae8-9d9c-a8dd9723dbd7_1796x712.png" width="1456" height="577" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5a8759b5-64cb-4ae8-9d9c-a8dd9723dbd7_1796x712.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:577,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:214954,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8759b5-64cb-4ae8-9d9c-a8dd9723dbd7_1796x712.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oWaO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8759b5-64cb-4ae8-9d9c-a8dd9723dbd7_1796x712.png 424w, https://substackcdn.com/image/fetch/$s_!oWaO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8759b5-64cb-4ae8-9d9c-a8dd9723dbd7_1796x712.png 848w, https://substackcdn.com/image/fetch/$s_!oWaO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8759b5-64cb-4ae8-9d9c-a8dd9723dbd7_1796x712.png 1272w, https://substackcdn.com/image/fetch/$s_!oWaO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8759b5-64cb-4ae8-9d9c-a8dd9723dbd7_1796x712.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This method loads in a &#8220;reference-counted pointer&#8221;, that is, a pointer to the object we&#8217;re checking the uniqueness of, in <strong>loadRefcountedPtr</strong>. Then it emits the <strong>isUnique</strong> function call as an LLVM IR instruction.</p><p>Following this <strong>emitIsUniqueCall</strong> function call along; we are led to <strong>GenHeap.cpp</strong> in the <strong>IRGen/</strong> library.</p><blockquote><p><em>The documentation at the top of the file reads:</em></p><p><em>&#8220;This file implements routines for arbitrary Swift-native heap objects, such as layout and reference-counting.&#8221;</em></p><p><em>Is that light I see at the end of the tunnel?</em></p></blockquote><p>Let&#8217;s read through the implementation of <strong>emitIsUniqueCall</strong>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!R2kq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe99af7a8-9dfb-4a2b-9de6-cc30a0b5ec18_2104x1064.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!R2kq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe99af7a8-9dfb-4a2b-9de6-cc30a0b5ec18_2104x1064.png 424w, https://substackcdn.com/image/fetch/$s_!R2kq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe99af7a8-9dfb-4a2b-9de6-cc30a0b5ec18_2104x1064.png 848w, https://substackcdn.com/image/fetch/$s_!R2kq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe99af7a8-9dfb-4a2b-9de6-cc30a0b5ec18_2104x1064.png 1272w, https://substackcdn.com/image/fetch/$s_!R2kq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe99af7a8-9dfb-4a2b-9de6-cc30a0b5ec18_2104x1064.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!R2kq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe99af7a8-9dfb-4a2b-9de6-cc30a0b5ec18_2104x1064.png" width="1456" height="736" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e99af7a8-9dfb-4a2b-9de6-cc30a0b5ec18_2104x1064.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:736,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:259747,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe99af7a8-9dfb-4a2b-9de6-cc30a0b5ec18_2104x1064.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!R2kq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe99af7a8-9dfb-4a2b-9de6-cc30a0b5ec18_2104x1064.png 424w, https://substackcdn.com/image/fetch/$s_!R2kq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe99af7a8-9dfb-4a2b-9de6-cc30a0b5ec18_2104x1064.png 848w, https://substackcdn.com/image/fetch/$s_!R2kq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe99af7a8-9dfb-4a2b-9de6-cc30a0b5ec18_2104x1064.png 1272w, https://substackcdn.com/image/fetch/$s_!R2kq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe99af7a8-9dfb-4a2b-9de6-cc30a0b5ec18_2104x1064.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I&#8217;ve omitted a ton of code here, mostly around switch cases for nullables and ObjC.</p><p>The <strong>getIsUniquelyReferenced_nonNull_nativeFunctionPointer() </strong>function call generates LLVM IR, which, when compiled and linked, calls into the Swift Runtime&#8482; upon execution.</p><p>It looks like our understanding of Builtins was a little incomplete. </p><p><strong>This is really important, probably the most important bit so far:</strong></p><p>Builtins usually represent low-level, memory-unsafe, hyper-efficient types like Builtin.Int1, Builtin.Int64, and Builtin.FPIEEE64 (a.k.a. &#8220;Double&#8221;). Stdlib structs like Bool and Int use these as internal backing storage.</p><p><strong>But Builtins can also function as direct Swift runtime calls</strong>. The functions compile directly down into instructions that call into the runtime library. </p><p>This is all possible due to the incestuously interlinked nature of Chris Lattner&#8217;s Targaryen harem: The Swift Standard Library, the Swift Compiler, and the Swift Runtime.</p><div><hr></div><h1><strong>The Swift Runtime</strong></h1><p>The Swift Runtime provides core functionality you need to execute a Swift program: Dynamic dispatch, error handling, types, <em>and memory management operations like reference counting</em>.</p><p>I think you can see where this is going, at last.</p><blockquote><p><em>If you like runtimes, but aren&#8217;t sure you&#8217;re ready to love runtimes, here&#8217;s an excellent primer:</em></p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;cb697d4c-691f-4e6c-8236-3077c999b8b8&quot;,&quot;caption&quot;:&quot;The Swift Runtime, a.k.a libswiftCore, is a C++ library that runs alongside Swift programs to facilitates core language features. I set out to understand what we mean by &#8220;runs alongside&#8221; and &#8220;facilitates core language features&#8221;.&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;md&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;The Swift Runtime: Your Silent Partner&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:126930235,&quot;name&quot;:&quot;Jacob Bartlett&quot;,&quot;bio&quot;:&quot;Master iOS. Boost your salary. Join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week. Sign up free today!&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!s80e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feab1e065-dffc-4096-ad9e-826ddda8a6cd_1304x1304.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100}],&quot;post_date&quot;:&quot;2024-12-16T17:15:51.319Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/45b9e4bb-b0ba-497b-a28b-12aaf6cd0dd1_1680x1200.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.jacobstechtavern.com/p/the-swift-runtime-your-silent-partner&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:152505616,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:18,&quot;comment_count&quot;:2,&quot;publication_id&quot;:1376173,&quot;publication_name&quot;:&quot;Jacob&#8217;s Tech Tavern&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LJp-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee402e25-4e20-4683-ba5f-20ca86eb2b43_512x512.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div></blockquote><div><hr></div><h2><strong>Checking the docs</strong></h2><p>Let&#8217;s investigate where the LLVM IR instruction for <strong>IGM.getIsUniquelyReferenced_nonNull_nativeFunctionPointer</strong> actually ends up. </p><p>This is more art than science: naming is fabulously inconsistent between Swift layers.</p><p>Like all good engineers, we can save ourselves hours of flailing about with a few minutes of reading documentation.</p><p>The <a href="https://github.com/apple/swift/blob/main/docs/Runtime.md">Swift Runtime ABI</a> documentation defines the interface that compiled machine instructions may call into. Specifically, the memory offset for each function inside the compiled runtime binary. </p><blockquote><p><em>I&#8217;ll do an article on ABI stability once I&#8217;m convinced lots of people will pay for it, because I am <strong>not</strong> touching that sh*t for free.</em></p></blockquote><p>The definition we&#8217;re looking for is <strong>_swift_isUniquelyReferenced_nonNull_native</strong>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!a8m4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e2c088-c89d-4c03-929c-01d6b9b08774_2362x1372.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!a8m4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e2c088-c89d-4c03-929c-01d6b9b08774_2362x1372.png 424w, https://substackcdn.com/image/fetch/$s_!a8m4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e2c088-c89d-4c03-929c-01d6b9b08774_2362x1372.png 848w, https://substackcdn.com/image/fetch/$s_!a8m4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e2c088-c89d-4c03-929c-01d6b9b08774_2362x1372.png 1272w, https://substackcdn.com/image/fetch/$s_!a8m4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e2c088-c89d-4c03-929c-01d6b9b08774_2362x1372.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!a8m4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e2c088-c89d-4c03-929c-01d6b9b08774_2362x1372.png" width="1456" height="846" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/94e2c088-c89d-4c03-929c-01d6b9b08774_2362x1372.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:846,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:379839,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e2c088-c89d-4c03-929c-01d6b9b08774_2362x1372.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!a8m4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e2c088-c89d-4c03-929c-01d6b9b08774_2362x1372.png 424w, https://substackcdn.com/image/fetch/$s_!a8m4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e2c088-c89d-4c03-929c-01d6b9b08774_2362x1372.png 848w, https://substackcdn.com/image/fetch/$s_!a8m4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e2c088-c89d-4c03-929c-01d6b9b08774_2362x1372.png 1272w, https://substackcdn.com/image/fetch/$s_!a8m4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e2c088-c89d-4c03-929c-01d6b9b08774_2362x1372.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://github.com/swiftlang/swift/blob/main/docs/Runtime.md">Runtime.md</a></figcaption></figure></div><p>Fortunately, we don&#8217;t need to search out <strong>000000000002aea0</strong> in some obscure binary.</p><p>Unfortunately, we do have quite a bit more C++ to sift through.</p><div><hr></div><h2><strong>Swift Object</strong></h2><p>I investigated the Swift Runtime source code in <strong>/stdlib/public/runtime</strong>. </p><p>Looking at <strong>SwiftObject.mm</strong> (an Objective C++ file!), we locate the function that was defined in the ABI:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bZzg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde678248-fe93-4925-b39f-46377401298b_1834x536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bZzg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde678248-fe93-4925-b39f-46377401298b_1834x536.png 424w, https://substackcdn.com/image/fetch/$s_!bZzg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde678248-fe93-4925-b39f-46377401298b_1834x536.png 848w, https://substackcdn.com/image/fetch/$s_!bZzg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde678248-fe93-4925-b39f-46377401298b_1834x536.png 1272w, https://substackcdn.com/image/fetch/$s_!bZzg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde678248-fe93-4925-b39f-46377401298b_1834x536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bZzg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde678248-fe93-4925-b39f-46377401298b_1834x536.png" width="1456" height="426" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de678248-fe93-4925-b39f-46377401298b_1834x536.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:426,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:188537,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde678248-fe93-4925-b39f-46377401298b_1834x536.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bZzg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde678248-fe93-4925-b39f-46377401298b_1834x536.png 424w, https://substackcdn.com/image/fetch/$s_!bZzg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde678248-fe93-4925-b39f-46377401298b_1834x536.png 848w, https://substackcdn.com/image/fetch/$s_!bZzg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde678248-fe93-4925-b39f-46377401298b_1834x536.png 1272w, https://substackcdn.com/image/fetch/$s_!bZzg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde678248-fe93-4925-b39f-46377401298b_1834x536.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>After some assertions to avoid undefined behaviour from null pointers (<a href="https://blog.jacobstechtavern.com/p/2-minute-tips-the-dark-secret-of">no type-safe nullability here!</a>), we are looking at the <strong>HeapObject</strong> argument, inspecting its <strong>refCount</strong> property, and asking if it&#8217;s uniquely referenced.</p><h4>HeapObject</h4><p>Every reference type in Swift stored in a block of memory on the heap. HeapObject represents the &#8220;header&#8221; metadata attached to each of these blocks of memory, stored contiguously in front of the memory itself, like so:</p><pre><code><code>+-----------------------+
| HeapObject            |  &lt;- header struct
| - metadata (isa) ptr  |     &lt;- type information
| - inlineRefCounts     |     &lt;- reference count bits
+-----------------------+
| Instance Data         |  &lt;- The actual data for your object 
| - field1              |
| - field2              |
| - ...                 |
+-----------------------+</code></code></pre><p>HeapObject is a simple C struct storing type metadata and reference counts. <strong>RefCounts</strong> is, itself, a struct that holds the strong, weak, and unowned reference counts of the object in memory.</p><blockquote><p><em>Uh, I also did a ridiculously in-depth deep-dive into reference counting here. Like, I literally look at the bit layout of the refCounts C struct. It&#8217;s good, clean fun. </em></p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;51fe7fab-b3ca-4c18-ab7f-b0a790a08c4d&quot;,&quot;caption&quot;:&quot;Every iOS dev has a soft spot, or perhaps a weak spot, for Swift reference counts. This stems from the fact that we've all survived countless interview questions about it:&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;md&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Bits &amp; Side Tables: How Reference Counting Works in Swift&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:126930235,&quot;name&quot;:&quot;Jacob Bartlett&quot;,&quot;bio&quot;:&quot;Master iOS. Boost your salary. Join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week. Sign up free today!&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!s80e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feab1e065-dffc-4096-ad9e-826ddda8a6cd_1304x1304.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100}],&quot;post_date&quot;:&quot;2025-08-25T15:02:22.684Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!UT9G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f8cc733-84bf-4955-a1bb-da3b2ccb0508_1680x1200.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.jacobstechtavern.com/p/swift-reference-counting&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:170428435,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:29,&quot;comment_count&quot;:0,&quot;publication_id&quot;:1376173,&quot;publication_name&quot;:&quot;Jacob&#8217;s Tech Tavern&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LJp-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee402e25-4e20-4683-ba5f-20ca86eb2b43_512x512.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div></blockquote><p>Like SEAL Team 6, let&#8217;s target where <strong>isUniquelyReferenced()</strong> is implemented, on the <strong>refCount</strong> for a HeapObject. With extreme prejudice.</p><div><hr></div><h1><strong>SwiftShims</strong></h1><p>SwiftShims is a lightweight compatibility layer between the Standard Library, the Runtime, the Compiler, and the OS. This collection of C and C++ header files helps to bridge high-level code with underlying system libraries.</p><p>Critically, <strong>RefCount.h</strong> implements the method we&#8217;re tracking down:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-WCQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbba576c-7485-4138-949d-24acafec66cd_1374x668.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-WCQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbba576c-7485-4138-949d-24acafec66cd_1374x668.png 424w, https://substackcdn.com/image/fetch/$s_!-WCQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbba576c-7485-4138-949d-24acafec66cd_1374x668.png 848w, https://substackcdn.com/image/fetch/$s_!-WCQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbba576c-7485-4138-949d-24acafec66cd_1374x668.png 1272w, https://substackcdn.com/image/fetch/$s_!-WCQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbba576c-7485-4138-949d-24acafec66cd_1374x668.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-WCQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbba576c-7485-4138-949d-24acafec66cd_1374x668.png" width="1374" height="668" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bbba576c-7485-4138-949d-24acafec66cd_1374x668.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:668,&quot;width&quot;:1374,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:188278,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbba576c-7485-4138-949d-24acafec66cd_1374x668.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-WCQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbba576c-7485-4138-949d-24acafec66cd_1374x668.png 424w, https://substackcdn.com/image/fetch/$s_!-WCQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbba576c-7485-4138-949d-24acafec66cd_1374x668.png 848w, https://substackcdn.com/image/fetch/$s_!-WCQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbba576c-7485-4138-949d-24acafec66cd_1374x668.png 1272w, https://substackcdn.com/image/fetch/$s_!-WCQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbba576c-7485-4138-949d-24acafec66cd_1374x668.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This <strong>refCount</strong> struct has an <strong>isUniquelyReferenced()</strong> property. For this uniqueness check, we safely load the memory into the <strong>bits</strong> property and ask if it&#8217;s uniquely referenced.</p><p>If the object has any weak references (or the strong or unowned ref counts overflow), the refCounts live on a &#8220;side table&#8221;. That&#8217;s why the <strong>isUniquelyReferenced()</strong> check either loads directly from <strong>refCounts</strong> or checks the side table.</p><p>Next, we can see the underlying implementation of <strong>isUniquelyReferenced()</strong>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LE28!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6cf1d82-f0df-4d2a-b56f-d100345b22bc_1700x580.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LE28!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6cf1d82-f0df-4d2a-b56f-d100345b22bc_1700x580.png 424w, https://substackcdn.com/image/fetch/$s_!LE28!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6cf1d82-f0df-4d2a-b56f-d100345b22bc_1700x580.png 848w, https://substackcdn.com/image/fetch/$s_!LE28!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6cf1d82-f0df-4d2a-b56f-d100345b22bc_1700x580.png 1272w, https://substackcdn.com/image/fetch/$s_!LE28!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6cf1d82-f0df-4d2a-b56f-d100345b22bc_1700x580.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LE28!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6cf1d82-f0df-4d2a-b56f-d100345b22bc_1700x580.png" width="1456" height="497" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e6cf1d82-f0df-4d2a-b56f-d100345b22bc_1700x580.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:497,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:156563,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6cf1d82-f0df-4d2a-b56f-d100345b22bc_1700x580.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LE28!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6cf1d82-f0df-4d2a-b56f-d100345b22bc_1700x580.png 424w, https://substackcdn.com/image/fetch/$s_!LE28!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6cf1d82-f0df-4d2a-b56f-d100345b22bc_1700x580.png 848w, https://substackcdn.com/image/fetch/$s_!LE28!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6cf1d82-f0df-4d2a-b56f-d100345b22bc_1700x580.png 1272w, https://substackcdn.com/image/fetch/$s_!LE28!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6cf1d82-f0df-4d2a-b56f-d100345b22bc_1700x580.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>getUseSlowRC</strong> checks whether there&#8217;s a side table storing overflowed pointer counts; and <strong>getIsDeiniting</strong> is fairly self-explanatory: deinitialisation only happens when a strong reference count is already zero.</p><p>The most important part here is <strong>getStrongExtraRefCount() == 0</strong>. Scrolling up to the documentation inline, we find:</p><blockquote><p><em>The strong RC is stored as an extra count: when the physical field is 0 the logical value is 1.</em></p></blockquote><p>If an object has exactly one strong reference (logical), the bits representing the strong reference count are 00000000 (physical). The <strong>getStrongExtraRefCount</strong> function finds us the strong reference count that we&#8217;re looking for, StrongExtraRefCount:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!l1eS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46da65c6-6102-489a-8ba1-c87bce17266e_1220x536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!l1eS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46da65c6-6102-489a-8ba1-c87bce17266e_1220x536.png 424w, https://substackcdn.com/image/fetch/$s_!l1eS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46da65c6-6102-489a-8ba1-c87bce17266e_1220x536.png 848w, https://substackcdn.com/image/fetch/$s_!l1eS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46da65c6-6102-489a-8ba1-c87bce17266e_1220x536.png 1272w, https://substackcdn.com/image/fetch/$s_!l1eS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46da65c6-6102-489a-8ba1-c87bce17266e_1220x536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!l1eS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46da65c6-6102-489a-8ba1-c87bce17266e_1220x536.png" width="1220" height="536" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/46da65c6-6102-489a-8ba1-c87bce17266e_1220x536.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:536,&quot;width&quot;:1220,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:153066,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46da65c6-6102-489a-8ba1-c87bce17266e_1220x536.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!l1eS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46da65c6-6102-489a-8ba1-c87bce17266e_1220x536.png 424w, https://substackcdn.com/image/fetch/$s_!l1eS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46da65c6-6102-489a-8ba1-c87bce17266e_1220x536.png 848w, https://substackcdn.com/image/fetch/$s_!l1eS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46da65c6-6102-489a-8ba1-c87bce17266e_1220x536.png 1272w, https://substackcdn.com/image/fetch/$s_!l1eS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46da65c6-6102-489a-8ba1-c87bce17266e_1220x536.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Here, we call into a C++ macro that returns the StrongExtraRefCount field stored in RefCount:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ag5B!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34cf2b01-debf-4dee-9f20-d1f7e3138bf0_1428x492.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ag5B!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34cf2b01-debf-4dee-9f20-d1f7e3138bf0_1428x492.png 424w, https://substackcdn.com/image/fetch/$s_!ag5B!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34cf2b01-debf-4dee-9f20-d1f7e3138bf0_1428x492.png 848w, https://substackcdn.com/image/fetch/$s_!ag5B!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34cf2b01-debf-4dee-9f20-d1f7e3138bf0_1428x492.png 1272w, https://substackcdn.com/image/fetch/$s_!ag5B!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34cf2b01-debf-4dee-9f20-d1f7e3138bf0_1428x492.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ag5B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34cf2b01-debf-4dee-9f20-d1f7e3138bf0_1428x492.png" width="1428" height="492" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/34cf2b01-debf-4dee-9f20-d1f7e3138bf0_1428x492.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:492,&quot;width&quot;:1428,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:147386,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34cf2b01-debf-4dee-9f20-d1f7e3138bf0_1428x492.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ag5B!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34cf2b01-debf-4dee-9f20-d1f7e3138bf0_1428x492.png 424w, https://substackcdn.com/image/fetch/$s_!ag5B!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34cf2b01-debf-4dee-9f20-d1f7e3138bf0_1428x492.png 848w, https://substackcdn.com/image/fetch/$s_!ag5B!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34cf2b01-debf-4dee-9f20-d1f7e3138bf0_1428x492.png 1272w, https://substackcdn.com/image/fetch/$s_!ag5B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34cf2b01-debf-4dee-9f20-d1f7e3138bf0_1428x492.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>These macros operate directly on the bits stored by RefCount to return the integer value of StrongExtraRefCount. These bitwise operations can be dense, so let&#8217;s take this step-by-step:</p><ul><li><p>The logical number <strong>StrongExtraRefCount</strong> is stored in the bits in RefCount&#8216;s memory layout, bit-packed with other metadata (unowned count and flags) to save space.</p></li><li><p>Let&#8217;s say the memory layout for the RefCount looks like 00101010 (in reality, it&#8217;s 64 bits wide, I&#8217;ll actually show you in a minute).</p></li><li><p>The bit-mask has 1s for the locations of the bits that represent the <strong>StrongExtraRefCount</strong>, e.g., 00001100.</p></li><li><p>We can run a bitwise &amp; operation to isolate just those bits, 0-ing out the rest of the data: leaving us with 00001000.</p></li><li><p>The offset <strong>##Shift</strong> contains the number of &#8220;significant&#8221; digits which the <strong>StrongExtraRefCount</strong> lives at, which in this example is two bits from the end (in this one-byte example, we don&#8217;t need to fret about endian-ness).</p></li><li><p>The right bit-shift operator &gt;&gt; shifts our bit-masked data to the right, returning 00000010.</p></li><li><p>This, in full binary glory, is the strong extra reference count we&#8217;re looking for: 10, or &#8220;2&#8221; if you&#8217;re a decimal normie.</p></li></ul><p>Therefore, our object has three strong references, meaning it&#8217;s not uniquely referenced!</p><blockquote><p><em>I&#8217;ll encourage you to read &#8220;<a href="https://blog.jacobstechtavern.com/p/swift-reference-counting">Bits and Side Tables</a>&#8221; once again because I show you the actual physical bits inside RefCount:</em> </p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vM63!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde50fe8-65a8-45a4-8b6c-0a3849cf3f69_1776x950.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vM63!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde50fe8-65a8-45a4-8b6c-0a3849cf3f69_1776x950.png 424w, https://substackcdn.com/image/fetch/$s_!vM63!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde50fe8-65a8-45a4-8b6c-0a3849cf3f69_1776x950.png 848w, https://substackcdn.com/image/fetch/$s_!vM63!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde50fe8-65a8-45a4-8b6c-0a3849cf3f69_1776x950.png 1272w, https://substackcdn.com/image/fetch/$s_!vM63!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde50fe8-65a8-45a4-8b6c-0a3849cf3f69_1776x950.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vM63!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde50fe8-65a8-45a4-8b6c-0a3849cf3f69_1776x950.png" width="1456" height="779" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cde50fe8-65a8-45a4-8b6c-0a3849cf3f69_1776x950.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:779,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:200344,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde50fe8-65a8-45a4-8b6c-0a3849cf3f69_1776x950.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vM63!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde50fe8-65a8-45a4-8b6c-0a3849cf3f69_1776x950.png 424w, https://substackcdn.com/image/fetch/$s_!vM63!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde50fe8-65a8-45a4-8b6c-0a3849cf3f69_1776x950.png 848w, https://substackcdn.com/image/fetch/$s_!vM63!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde50fe8-65a8-45a4-8b6c-0a3849cf3f69_1776x950.png 1272w, https://substackcdn.com/image/fetch/$s_!vM63!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde50fe8-65a8-45a4-8b6c-0a3849cf3f69_1776x950.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h1><strong>The </strong>isKnownUniquelyReferenced Meme</h1><p>We&#8217;ve finally determined how <strong>isKnownUniquelyReferenced</strong> is working behind the scenes to power our &#128046; optimisations.</p><p>It&#8217;s all a bit obvious, really.</p><p>Each time a new pointer is created to reference an object stored on heap memory strongly, it increments the strong reference count of that object.</p><p>isKnownUniquelyReferenced simply slips through its backchannel into the runtime  to ask whether the object&#8217;s strong reference count is equal to 1.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-5fq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07ba4675-7850-4a63-9598-7c258f153b66_500x1069.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-5fq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07ba4675-7850-4a63-9598-7c258f153b66_500x1069.jpeg 424w, https://substackcdn.com/image/fetch/$s_!-5fq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07ba4675-7850-4a63-9598-7c258f153b66_500x1069.jpeg 848w, https://substackcdn.com/image/fetch/$s_!-5fq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07ba4675-7850-4a63-9598-7c258f153b66_500x1069.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!-5fq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07ba4675-7850-4a63-9598-7c258f153b66_500x1069.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-5fq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07ba4675-7850-4a63-9598-7c258f153b66_500x1069.jpeg" width="500" height="1069" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/07ba4675-7850-4a63-9598-7c258f153b66_500x1069.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1069,&quot;width&quot;:500,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!-5fq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07ba4675-7850-4a63-9598-7c258f153b66_500x1069.jpeg 424w, https://substackcdn.com/image/fetch/$s_!-5fq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07ba4675-7850-4a63-9598-7c258f153b66_500x1069.jpeg 848w, https://substackcdn.com/image/fetch/$s_!-5fq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07ba4675-7850-4a63-9598-7c258f153b66_500x1069.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!-5fq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07ba4675-7850-4a63-9598-7c258f153b66_500x1069.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">7-tier expanding brain meme, created with <a href="https://imgflip.com/memegenerator/180509546/7-Tier-Expanding-Brain">Memegenerator</a></figcaption></figure></div><p><em><strong>(Accessible version of the meme)</strong></em></p><ul><li><p>isKnownUniquelyReferenced just checks the strong reference count = 1</p></li><li><p>isUnique in the Swift Standard Library calls a Builtin function</p></li><li><p>The Abstract Syntax Tree synthesises Builtin functions so they can be called like regular Swift functions</p></li><li><p>Swift Intermediary Language emits the IsUniqueInst instruction, which performs the uniqueness check</p></li><li><p>The LLVM IR instruction generates the emitIsUnique instruction, which calls into the Swift Runtime ABI</p></li><li><p>The Swift Runtime inspects the bits on a HeapObject which stores the strong reference count</p></li><li><p>isKnownUniquelyReferenced just checks the strong reference count = 1</p></li></ul><div><hr></div><h2><strong>Last Orders</strong></h2><p>When I first casually looked into <strong>isKnownUniquelyReferenced</strong> back in 2023, I had no idea what I was getting into. I assumed I&#8217;d poke around the Swift Standard Library, find some funny private API that tracked a sneaky reference count property somewhere, and call it a day.</p><p>Curiosity is a heavy burden.</p><p>Like Dante, I kept pressing forward.</p><p>Into the haunted woods of the Standard Library source code. Through the purgatorial hallways of Builtin definitions. Deeper and deeper, through the infernal circles of the Swift Compiler: the Abstract Syntax Tree, Swift Intermediary Language, and LLVM IR. Until finally, paradise was found in the Swift Runtime and SwiftShims.</p><p>Today, Swift Internals is a core pillar of Jacob&#8217;s Tech Tavern. </p><p>I hope you had fun, learned a lot, and, most importantly, I hope you get the chance to flex your unbeatable &#128046; knowledge the next time you get an iOS job interview.</p><blockquote><p><em><strong>If you liked my post, subscribe free to join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week.</strong></em></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.jacobstechtavern.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.jacobstechtavern.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><blockquote><p><em>This is a full re-write my most underrated post of all time. Nobody read it, because I only had 291 subscribers at the time. Really.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5mMY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff14bd357-8ab8-4a95-a876-f8b289170083_1770x844.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5mMY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff14bd357-8ab8-4a95-a876-f8b289170083_1770x844.png 424w, https://substackcdn.com/image/fetch/$s_!5mMY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff14bd357-8ab8-4a95-a876-f8b289170083_1770x844.png 848w, https://substackcdn.com/image/fetch/$s_!5mMY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff14bd357-8ab8-4a95-a876-f8b289170083_1770x844.png 1272w, https://substackcdn.com/image/fetch/$s_!5mMY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff14bd357-8ab8-4a95-a876-f8b289170083_1770x844.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5mMY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff14bd357-8ab8-4a95-a876-f8b289170083_1770x844.png" width="1456" height="694" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f14bd357-8ab8-4a95-a876-f8b289170083_1770x844.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:694,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:121216,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.jacobstechtavern.com/i/181220219?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff14bd357-8ab8-4a95-a876-f8b289170083_1770x844.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5mMY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff14bd357-8ab8-4a95-a876-f8b289170083_1770x844.png 424w, https://substackcdn.com/image/fetch/$s_!5mMY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff14bd357-8ab8-4a95-a876-f8b289170083_1770x844.png 848w, https://substackcdn.com/image/fetch/$s_!5mMY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff14bd357-8ab8-4a95-a876-f8b289170083_1770x844.png 1272w, https://substackcdn.com/image/fetch/$s_!5mMY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff14bd357-8ab8-4a95-a876-f8b289170083_1770x844.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>I hope I can bring the joy to a new generation of subscribers.</em></p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;470a93dc-41c6-4bdb-b725-3856a2de89b5&quot;,&quot;caption&quot;:&quot;Subscribe to Jacob&#8217;s Tech Tavern for free to get ludicrously in-depth articles on iOS, Swift, tech, &amp; indie projects in your inbox every two weeks.&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;md&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;COW2LLVM: The isKnownUniquelyReferenced Deep-Dive &quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:126930235,&quot;name&quot;:&quot;Jacob Bartlett&quot;,&quot;bio&quot;:&quot;Master iOS. Boost your salary. Join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week. Sign up free today!&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!s80e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feab1e065-dffc-4096-ad9e-826ddda8a6cd_1304x1304.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100}],&quot;post_date&quot;:&quot;2023-11-06T17:20:18.179Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!lZbv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c5730fc-2271-4fe1-a850-1eb13eb66708_1400x930.jpeg&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.jacobstechtavern.com/p/cow2llvm-the-isknownuniquelyreferenced&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:138629860,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:13,&quot;comment_count&quot;:2,&quot;publication_id&quot;:1376173,&quot;publication_name&quot;:&quot;Jacob&#8217;s Tech Tavern&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LJp-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee402e25-4e20-4683-ba5f-20ca86eb2b43_512x512.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p><em>And if you liked this post, you will <strong>love</strong> this:</em></p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;e56a600f-4789-4391-a4e3-5365ae738b2f&quot;,&quot;caption&quot;:&quot;Today I&#8217;m selling shovels. A treasure map. The equipment you need to tunnel through the Swift source code and mine out the nuggets of arcane knowledge reserved for C++ and compiler geeks.&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;md&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;How to Learn the Swift Source Code&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:126930235,&quot;name&quot;:&quot;Jacob Bartlett&quot;,&quot;bio&quot;:&quot;Master iOS. Boost your salary. Join 100,000 senior Swift devs learning advanced concurrency, SwiftUI, and iOS performance for 10 minutes a week. Sign up free today!&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!s80e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feab1e065-dffc-4096-ad9e-826ddda8a6cd_1304x1304.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100}],&quot;post_date&quot;:&quot;2025-07-22T15:02:11.838Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LGzj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ab95ff2-d803-458d-9b6e-cfe56f3226ee_1680x1200.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.jacobstechtavern.com/p/swift-source-code&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:168148655,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:14,&quot;comment_count&quot;:0,&quot;publication_id&quot;:1376173,&quot;publication_name&quot;:&quot;Jacob&#8217;s Tech Tavern&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LJp-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee402e25-4e20-4683-ba5f-20ca86eb2b43_512x512.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div></blockquote>]]></content:encoded></item></channel></rss>