<?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[maxste.in]]></title><description><![CDATA[Tech, iOS, App Development, Cryptocurrency, Marketing, Programming and more.]]></description><link>https://blog.maxste.in</link><image><url>https://substackcdn.com/image/fetch/$s_!QX3H!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1439e40-2175-4dce-8476-5ccd1c1a7429_319x319.png</url><title>maxste.in</title><link>https://blog.maxste.in</link></image><generator>Substack</generator><lastBuildDate>Mon, 20 Apr 2026 15:00:24 GMT</lastBuildDate><atom:link href="https://blog.maxste.in/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Maxwell Stein]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[maxstein@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[maxstein@substack.com]]></itunes:email><itunes:name><![CDATA[Max Stein]]></itunes:name></itunes:owner><itunes:author><![CDATA[Max Stein]]></itunes:author><googleplay:owner><![CDATA[maxstein@substack.com]]></googleplay:owner><googleplay:email><![CDATA[maxstein@substack.com]]></googleplay:email><googleplay:author><![CDATA[Max Stein]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Build a price tracker for Bitcoin, Ethereum, & more in Swift (Part 2)]]></title><description><![CDATA[This is part 2 of my Ethereum/Bitcoin price tracking app tutorial.]]></description><link>https://blog.maxste.in/p/build-a-price-tracker-for-bitcoin</link><guid isPermaLink="false">https://blog.maxste.in/p/build-a-price-tracker-for-bitcoin</guid><dc:creator><![CDATA[Max Stein]]></dc:creator><pubDate>Mon, 11 Mar 2024 00:55:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Pc7d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F216a1f7b-0a58-43d2-9f01-77d0a6a52658_1400x800.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Pc7d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F216a1f7b-0a58-43d2-9f01-77d0a6a52658_1400x800.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Pc7d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F216a1f7b-0a58-43d2-9f01-77d0a6a52658_1400x800.webp 424w, https://substackcdn.com/image/fetch/$s_!Pc7d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F216a1f7b-0a58-43d2-9f01-77d0a6a52658_1400x800.webp 848w, https://substackcdn.com/image/fetch/$s_!Pc7d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F216a1f7b-0a58-43d2-9f01-77d0a6a52658_1400x800.webp 1272w, https://substackcdn.com/image/fetch/$s_!Pc7d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F216a1f7b-0a58-43d2-9f01-77d0a6a52658_1400x800.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Pc7d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F216a1f7b-0a58-43d2-9f01-77d0a6a52658_1400x800.webp" width="1400" height="800" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/216a1f7b-0a58-43d2-9f01-77d0a6a52658_1400x800.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:800,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:45024,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Pc7d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F216a1f7b-0a58-43d2-9f01-77d0a6a52658_1400x800.webp 424w, https://substackcdn.com/image/fetch/$s_!Pc7d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F216a1f7b-0a58-43d2-9f01-77d0a6a52658_1400x800.webp 848w, https://substackcdn.com/image/fetch/$s_!Pc7d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F216a1f7b-0a58-43d2-9f01-77d0a6a52658_1400x800.webp 1272w, https://substackcdn.com/image/fetch/$s_!Pc7d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F216a1f7b-0a58-43d2-9f01-77d0a6a52658_1400x800.webp 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>This is part 2 of my Ethereum/Bitcoin price tracking app tutorial. You can read <a href="https://maxste.in/build-an-ethereum-bitcoin-price-tracking-app-in-swift-f467b7f3ae35">part 1 here</a> if you&#8217;d like to get caught up. I wrote this tutorial so you can follow it even if you didn&#8217;t read <a href="https://maxste.in/build-an-ethereum-bitcoin-price-tracking-app-in-swift-f467b7f3ae35">part 1</a>, however.</p><p>I wrote the first part of this tutorial on October 10th 2017. Since then the Bitcoin price has gone from $4,805 to $16,764 (as of December 21st, 2017) over a 348% increase!</p><p>I would say now is a great time to add Bitcoin support to our price tracker. Now that we&#8217;ll be adding a second currency it&#8217;d be nice to make our solution scalable to many currencies. When we&#8217;re done the app will look like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fWci!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2d7fe-7cff-483d-80bb-27c34475ccf9_700x1376.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fWci!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2d7fe-7cff-483d-80bb-27c34475ccf9_700x1376.png 424w, https://substackcdn.com/image/fetch/$s_!fWci!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2d7fe-7cff-483d-80bb-27c34475ccf9_700x1376.png 848w, https://substackcdn.com/image/fetch/$s_!fWci!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2d7fe-7cff-483d-80bb-27c34475ccf9_700x1376.png 1272w, https://substackcdn.com/image/fetch/$s_!fWci!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2d7fe-7cff-483d-80bb-27c34475ccf9_700x1376.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fWci!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2d7fe-7cff-483d-80bb-27c34475ccf9_700x1376.png" width="700" height="1376" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8ae2d7fe-7cff-483d-80bb-27c34475ccf9_700x1376.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1376,&quot;width&quot;:700,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!fWci!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2d7fe-7cff-483d-80bb-27c34475ccf9_700x1376.png 424w, https://substackcdn.com/image/fetch/$s_!fWci!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2d7fe-7cff-483d-80bb-27c34475ccf9_700x1376.png 848w, https://substackcdn.com/image/fetch/$s_!fWci!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2d7fe-7cff-483d-80bb-27c34475ccf9_700x1376.png 1272w, https://substackcdn.com/image/fetch/$s_!fWci!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae2d7fe-7cff-483d-80bb-27c34475ccf9_700x1376.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">Supports Bitcoin, Ethereum, Litecoin, Ripple, Monero, and NEO</figcaption></figure></div><p>Lets jump right in. Download the starter project <a href="https://github.com/allgamesallfree/CryptoTracker/archive/part2-start.zip">here</a> then open &#8220;<em>CryptoTracker.xcodeproj</em>&#8221;. You&#8217;ll need Xcode 9 to open it up since the project is built in Swift 4.</p><p>Open up &#8220;<em>Assets.xcassets</em>&#8221; from the projects pane on the left-hand side, then expand the &#8220;<em>Currencies</em>&#8221; folder. You&#8217;ll see the project already has logos for the six currencies we&#8217;ll be supporting in this tutorial.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7yph!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe585d4e-e25a-4cea-80b5-fb41c7c61446_1400x655.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7yph!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe585d4e-e25a-4cea-80b5-fb41c7c61446_1400x655.png 424w, https://substackcdn.com/image/fetch/$s_!7yph!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe585d4e-e25a-4cea-80b5-fb41c7c61446_1400x655.png 848w, https://substackcdn.com/image/fetch/$s_!7yph!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe585d4e-e25a-4cea-80b5-fb41c7c61446_1400x655.png 1272w, https://substackcdn.com/image/fetch/$s_!7yph!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe585d4e-e25a-4cea-80b5-fb41c7c61446_1400x655.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7yph!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe585d4e-e25a-4cea-80b5-fb41c7c61446_1400x655.png" width="1400" height="655" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fe585d4e-e25a-4cea-80b5-fb41c7c61446_1400x655.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:655,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!7yph!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe585d4e-e25a-4cea-80b5-fb41c7c61446_1400x655.png 424w, https://substackcdn.com/image/fetch/$s_!7yph!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe585d4e-e25a-4cea-80b5-fb41c7c61446_1400x655.png 848w, https://substackcdn.com/image/fetch/$s_!7yph!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe585d4e-e25a-4cea-80b5-fb41c7c61446_1400x655.png 1272w, https://substackcdn.com/image/fetch/$s_!7yph!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe585d4e-e25a-4cea-80b5-fb41c7c61446_1400x655.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>Now, select &#8220;<em>Main.storyboard</em>&#8221; from the projects pane and you&#8217;ll see a <code>UITableViewController</code> with an embedded <code>UITableViewCell</code>. Expand from the left-hand panel &#8220;<em>Crypto Table View Controller Scene &#8594; Crypto Table View Controller &#8594; Table View &#8594;CryptoTableViewCell &#8594;Content View</em>&#8221; then select <code>CryptoTableViewCell</code>. From there you should tap the &#8220;<em>Connections Inspector</em>&#8221; which is the last button on the top right in the panel on the right-hand side. (Looks like an &#8594; symbol inside a circle):</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FYId!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5813c78f-278a-4e60-8137-1b6bcf1647ff_1400x429.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FYId!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5813c78f-278a-4e60-8137-1b6bcf1647ff_1400x429.png 424w, https://substackcdn.com/image/fetch/$s_!FYId!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5813c78f-278a-4e60-8137-1b6bcf1647ff_1400x429.png 848w, https://substackcdn.com/image/fetch/$s_!FYId!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5813c78f-278a-4e60-8137-1b6bcf1647ff_1400x429.png 1272w, https://substackcdn.com/image/fetch/$s_!FYId!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5813c78f-278a-4e60-8137-1b6bcf1647ff_1400x429.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FYId!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5813c78f-278a-4e60-8137-1b6bcf1647ff_1400x429.png" width="1400" height="429" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5813c78f-278a-4e60-8137-1b6bcf1647ff_1400x429.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:429,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&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_!FYId!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5813c78f-278a-4e60-8137-1b6bcf1647ff_1400x429.png 424w, https://substackcdn.com/image/fetch/$s_!FYId!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5813c78f-278a-4e60-8137-1b6bcf1647ff_1400x429.png 848w, https://substackcdn.com/image/fetch/$s_!FYId!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5813c78f-278a-4e60-8137-1b6bcf1647ff_1400x429.png 1272w, https://substackcdn.com/image/fetch/$s_!FYId!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5813c78f-278a-4e60-8137-1b6bcf1647ff_1400x429.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 Table View is of type <code>CryptoTableViewController</code> and the cell is of type <code>CryptoTableViewCell</code>. These correspond to those two files within the projects pane. The cell has 3 subviews. The first is a <code>UIImageView</code> which will show the icon for a currency, named <code>currencyImageView</code><em>. </em>The bold text that says &#8220;<em>Cryptocurrency Name&#8221;</em> is a <code>UILabel</code> named <code>currencyName</code>. The text underneath that that says &#8220;$<em>0.00&#8221;</em> will show our price in USD, named <code>currencyPrice</code>.</p><p>Open up &#8220;<em>CryptoTableViewCell.swift&#8221;</em> and you&#8217;ll see it has <code>@IBOutlet</code>&#8217;s for the <code>currencyImageView</code><em>, </em><code>currencyName</code><em>, </em>and<em> </em><code>currencyPrice</code>. This is connected to the <code>UIImageView</code>, and two <code>UILabel</code>s we just looked at in &#8220;<em>Main.storyboard</em>&#8221;.</p><h2><strong>A data model for Cryptocurrencies</strong></h2><p>Now its time to start adding support for some Cryptocurrencies. Create a new file (&#8984;+n), select &#8220;<em>Swift File&#8221;</em> as the type and click next in the bottom right. In the &#8220;<em>Save as&#8221;</em> prompt name the file &#8220;<em>CurrencyType&#8221;</em> and click &#8220;<em>Create&#8221; </em>in the bottom right of the prompt.</p><p>Add the following enum on line 10 of the new file:</p><p><code>CurrencyType</code> is an <code>enum</code> which we will use to represent six different Cryptocurrencies, Bitcoin (BTC), Ethereum (ETH), Litecoin (LTC), Ripple (XRP), Monero (XMR), and NEO (NEO). Its a <code>String</code> type <code>enum</code> so if you try to read its <code>rawValue</code> it will <code>return</code> the <code>String</code> its associated with. For instance, <code>CurrencyType.btc.rawValue</code> returns the <code>String</code> &#8220;<em>BTC&#8221;</em>.</p><p>In <a href="https://maxste.in/build-an-ethereum-bitcoin-price-tracking-app-in-swift-f467b7f3ae35">part 1</a> we used the <a href="https://www.cryptocompare.com/api/#introduction">CryptoCompare API</a> to get the price of Ethereum by performing a GET request at the following URL:</p><pre><code>let apiURL = URL(string: &#8220;https://min-api.cryptocompare.com/data/price?fsym=ETH&amp;tsyms=USD")</code></pre><p>Our <code>enum</code> cases have a <code>rawValue</code> associated with them mapping to each of the six Cryptocurrencies. We can use that to modify this <code>URL</code> to get the value for each of them. To do so hit enter on line 17 then add the following on line 18 of the file:</p><p>By leveraging the <code>rawValue</code> we can now get the respective <code>URL</code> for any Cryptocurrency we add to the <code>CurrencyType</code> <code>enum</code>. For example<code>CurrencyType.btc.apiURL</code> returns the <code>URL</code>:</p><p><a href="https://min-api.cryptocompare.com/data/price?fsym=BTC&amp;tsyms=USD">https://min-api.cryptocompare.com/data/price?fsym=BTC&amp;tsyms=USD</a></p><p>Going to this <code>URL</code> will get back the BTC price in USD.</p><p>Now to display the name of these currencies within the cell, we create a variable called <code>name</code>. Add the following to line 23 underneath the <code>apiURL</code> <code>var</code>:</p><p>This will allow us to get the name back for a <code>CurrencyType</code> as a <code>String</code>. For instance, <code>CurrencyType.xrp.name</code> will <code>return</code> the <code>String</code> &#8220;<em>Ripple</em>&#8221;.</p><p>Next, we&#8217;ll want to be able to get the image for each of the currencies icons. To use the <code>UIImage</code> API we must first import <code>UIKit</code>, to do that replace <code>import Foundation</code> on line 9 with the following:</p><pre><code>import UIKit</code></pre><p>Now that we can use <code>UIImage</code>'s API lets create a <code>var</code> called <code>image</code> by adding this on line 40:</p><p><code>#imageLiteral</code> extracts the image with the specified <code>resourceName</code> seen above from the &#8220;<em>Assets.xcassets&#8221;</em> catalog we looked at earlier. It returns a guaranteed non-nil image since the name maps with that image&#8217;s name within the Asset catalog. If you try deleting <code>#imageLiteral(resourceName: "Bitcoin")</code> above and start typing the word &#8220;<em>Bitcoin&#8221;</em> you should be able to select the &#8220;<em>Bitcoin&#8221; </em><code>#imageLiteral</code> from autocomplete:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ls7H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c49bfd1-66f4-43ae-9d18-f615d43f722f_1240x242.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ls7H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c49bfd1-66f4-43ae-9d18-f615d43f722f_1240x242.png 424w, https://substackcdn.com/image/fetch/$s_!Ls7H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c49bfd1-66f4-43ae-9d18-f615d43f722f_1240x242.png 848w, https://substackcdn.com/image/fetch/$s_!Ls7H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c49bfd1-66f4-43ae-9d18-f615d43f722f_1240x242.png 1272w, https://substackcdn.com/image/fetch/$s_!Ls7H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c49bfd1-66f4-43ae-9d18-f615d43f722f_1240x242.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ls7H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c49bfd1-66f4-43ae-9d18-f615d43f722f_1240x242.png" width="1240" height="242" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8c49bfd1-66f4-43ae-9d18-f615d43f722f_1240x242.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:242,&quot;width&quot;:1240,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&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_!Ls7H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c49bfd1-66f4-43ae-9d18-f615d43f722f_1240x242.png 424w, https://substackcdn.com/image/fetch/$s_!Ls7H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c49bfd1-66f4-43ae-9d18-f615d43f722f_1240x242.png 848w, https://substackcdn.com/image/fetch/$s_!Ls7H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c49bfd1-66f4-43ae-9d18-f615d43f722f_1240x242.png 1272w, https://substackcdn.com/image/fetch/$s_!Ls7H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c49bfd1-66f4-43ae-9d18-f615d43f722f_1240x242.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Hitting Enter on the image in autocomplete will put the #imageLiteral in this spot</figcaption></figure></div><p>And now we have an icon and a name for each of our Cryptocurrencies. Next step is to actually be able to get the current value for each of these. For this, we need to make a GET request to the <a href="https://www.cryptocompare.com/api/#introduction">CryptoCompare</a> API.</p><p>Recall earlier that we already have a <code>var</code> called <code>apiURL</code> which maps to the correct <code>URL</code> for each of our currencies prices. We can use that <code>URL</code> to make a request to the API and store the price as a <code>String</code>. Add the following <code>func</code> on line 58 that we&#8217;ll use for this request:</p><p>Our <code>requestValue</code> function has a completion block which will <code>return</code> an <code>NSNumber?</code>. We are using a completion block here because a <code>URLRequest</code> is a background operation, meaning that the UI work of rendering the app occurs while the function is operating. Once this function completes its work in the background we can use the <code>value</code> <code>var</code> it gets back on the main thread through a completion handler.</p><p>The first step in the function is to safely unwrap <code>apiURL</code>, recall earlier that the type of <code>apiURL</code> was <code>URL?</code> so to use it for requests it must be unwrapped first. Our guard statement does that and gives us an <code>apiURL</code> instance of type <code>URL</code>.</p><p>Now lets start the request. Hit enter on line 64 then add this on line 65:</p><p>First, we perform a <code>dataTask</code> request that takes in the <code>URL</code>, using Apple&#8217;s <a href="https://developer.apple.com/documentation/foundation/urlsession">URLSession API</a>. It returns <code>Data</code> from the call, a response(which returns information about the call), and an optional <code>Error</code> in the event of failure.</p><p>We do <code>request.resume()</code> at the end which starts the call. At this point, we are not doing anything with the information returned. Let&#8217;s replace the <code>TODO</code> with the following:</p><p>This confirms that the data we got back isn&#8217;t <code>nil</code> and that there weren&#8217;t any errors. In the <code>else</code> case we send back <code>nil</code> since no data was found and try to print the <code>Error</code>, for safety we unwrap it using <code>?</code> to get back a description of the <code>Error</code> and if no description is found we print an empty <code>String</code>. The <code>Error</code> should never be <code>nil</code> here but using optionals is a good habit to get into for writing safe code.</p><p>Now we have the <code>Data</code> safely unwrapped and made sure there aren&#8217;t any errors, now its time to fetch the USD value from the <code>JSON</code> response we got back from the server. To do so add the following on line 71 underneath the <code>guard</code> block we just added:</p><p>To read the <code>JSON</code> <code>Data</code>, we use the <a href="https://developer.apple.com/documentation/foundation/jsonserialization">JSONSerialization</a> class from Apple, which takes <code>JSON</code> <code>Data</code> and converts it into a <code>Dictionary</code>. Since this method throws an <code>Error</code> in the case of failure, we need to add <code>do</code> at the beginning and <code>catch</code> to handle errors.</p><p>Once we have the <code>Dictionary</code> we can start reading values, inside the <code>JSON</code> <code>Dictionary</code> is the key &#8220;<em>USD&#8221; </em>which contains the US price of the currency as a number so we cast that value to <code>NSNumber</code>.</p><p>If for whatever reason we can&#8217;t get back the value we pass <code>nil</code> to the completion block again and <code>return</code>. If we do get the value back safely though we pass it to the completion block.</p><h2><strong>Setting up our cell to display Cryptocurrencies</strong></h2><p>Alright, now that the <code>CurrencyType</code> stores a name, image, and value for each of our currencies we can now use it in our <code>CryptoTableViewCell</code>, open up &#8220;<em>CryptoTableViewCell.swift&#8221;</em> from the projects pane on the left-hand side.</p><p>To display the value we get back from the <code>requestValue</code> function we need a way to format the value as US currency. Let&#8217;s write a <code>private extension</code> for <code>NSNumber</code> to do this. Add the following on line 18 of the file underneath the <code>CryptoTableViewCell</code>:</p><p>By making this an extension of <code>NSNumber</code> we can access the <code>var</code> from an <code>NSNumber</code> instance.</p><p>The <code>formattedCurrencyString</code> uses <a href="https://developer.apple.com/documentation/foundation/numberformatter">NumberFormatter</a>, a class from Apple that takes numbers and represents them in various text formats. By setting the <code>locale</code> to <code>en_us</code><em> </em>and the <code>numberStyle</code> to <code>.currency</code> we can use the <code>NumberFormatter</code> to represent the value in US dollars.</p><p>We then use the <code>NumberFormatter</code>&#8217;s <code>string(from:)</code> method by passing in <code>self</code> which is our instance of <code>NSNumber</code>. This returns an optional <code>String?</code> instance formatting the number as US dollars.</p><p>Now let&#8217;s take care of formatting our cell with the <code>CurrencyType</code> data model. To do so we need to set the <code>currencyImageView</code>, <code>currencyName</code>, and <code>currencyPrice</code> with the values from a <code>CurrencyType</code> instance. Add the following on line 16 right under those 3 <code>@IBOutlet</code>s:</p><p><code>formatCell</code> is a function that takes in a <code>CurrencyType</code> instance, sets the text for <code>currencyName</code> equal to <code>currencyType.name</code> and the image for <code>currencyImageView</code> equal to <code>currencyType.image</code>. It also performs the <code>requestValue</code> function to fetch the value of the currency.</p><p><code>requestValue</code> has a completion block which returns with an instance of <code>NSNumber?</code> which either holds the value of the currency or <code>nil</code>. This happens in the background so we use Apple&#8217;s <a href="https://developer.apple.com/documentation/dispatch">Dispatch</a> API to set the text for currencyPrice on the main thread using <code>DispatchQueue.main.async</code>.</p><p>Since <code>value</code> is optional we can unwrap it as <code>value?</code> and then get the US currency <code>String</code> using the <code>formattedCurrencyString</code> variable we wrote. Since this operation could <code>return</code> <code>nil</code> we handle the failure case using the <code>??</code> operator. <code>??</code> means if <code>value?.formattedCurrencyString</code> is <code>nil</code> it will <code>return</code> whats on the right-hand side instead.</p><p>In this case, we <code>return</code> the <code>String</code> &#8220;<em>Failed to get price</em>&#8221;. It&#8217;s a good idea when working with API&#8217;s to assume errors can happen, and to handle these without force unwrapping using <code>!</code> which would crash the app if one of our currency API calls failed.</p><h2><strong>Populate the table view with our Cryptocurrencies</strong></h2><p>Now that the cell is able to display a Cryptocurrency we need to hook up the <code>CryptoTableViewController</code> to pass in some <code>CurrencyType</code> instances to display. Open up &#8220;<em>CryptoTableViewController.swift</em>&#8221; then add the following on line 12:</p><p>The <code>currencies</code> <code>Array</code> stores an instance of each of the six Cryptocurrencies we support. <code>reuseIdentifier</code> is a <code>String</code> describing <code>CryptoTableViewCell.self</code> which will <code>return</code> the name of the class &#8220;<em>CryptoTableViewCell</em>&#8221;. The <code>reuseIdentifier</code> will be used when we dequeue <code>CryptoTableViewCell</code> instances later on.</p><p>Next, let&#8217;s implement <code>numberOfRowsInSection</code> which tells the <code>UITableView</code> how many rows we will display. This should be equal to the number of currencies. To do so hit enter under the <code>reuseIdentifier</code> then add the following on line 15:</p><p><code>currencies.count</code> returns the number of items in the <code>currencies</code> array, which is six.</p><p>Now let&#8217;s populate the cells with our currencies. To do so we will be using the <code>cellForRowAtIndexPath</code> method. Hit enter on line 18 then add the following on line 19:</p><p><code>cellForRowAtIndexPath</code> expects back an instance of <code>UITableViewCell</code> which is ready to be displayed. We use the <code>UITableView</code> function <code>dequeueReusableCell</code> which uses the <code>reuseIdentifier</code> and the current <code>IndexPath</code> to get an instance of our <code>CryptoTableViewCell</code>.</p><p>Since <code>dequeueReusableCell</code> returns <code>CryptoTableViewCell</code> as its super class <code>UITableViewCell</code> we have to then cast our <code>tableViewCell</code> instance as a <code>CryptoTableViewCell</code>. From there we can call the <code>formatCell</code> function we wrote to actually populate the cell with the <code>CurrencyType</code> for the current row, which we get back by using <code>currencies[indexPath.row]</code>.</p><p>Finally, we <code>return</code> the <code>tableViewCell</code> instance so the <code>UITableView</code> can prepare to display it.</p><h2><strong>Giving it a test drive</strong></h2><p>Now that everything is set up let&#8217;s try running the app (&#8984;+R). You should see six cells populate our table view like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Hlnj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb23d83-b7fa-45db-a626-10a5c6386e3e_700x1376.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Hlnj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb23d83-b7fa-45db-a626-10a5c6386e3e_700x1376.png 424w, https://substackcdn.com/image/fetch/$s_!Hlnj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb23d83-b7fa-45db-a626-10a5c6386e3e_700x1376.png 848w, https://substackcdn.com/image/fetch/$s_!Hlnj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb23d83-b7fa-45db-a626-10a5c6386e3e_700x1376.png 1272w, https://substackcdn.com/image/fetch/$s_!Hlnj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb23d83-b7fa-45db-a626-10a5c6386e3e_700x1376.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Hlnj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb23d83-b7fa-45db-a626-10a5c6386e3e_700x1376.png" width="700" height="1376" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7cb23d83-b7fa-45db-a626-10a5c6386e3e_700x1376.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1376,&quot;width&quot;:700,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&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_!Hlnj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb23d83-b7fa-45db-a626-10a5c6386e3e_700x1376.png 424w, https://substackcdn.com/image/fetch/$s_!Hlnj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb23d83-b7fa-45db-a626-10a5c6386e3e_700x1376.png 848w, https://substackcdn.com/image/fetch/$s_!Hlnj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb23d83-b7fa-45db-a626-10a5c6386e3e_700x1376.png 1272w, https://substackcdn.com/image/fetch/$s_!Hlnj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb23d83-b7fa-45db-a626-10a5c6386e3e_700x1376.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><strong>Finishing Touches</strong></h2><p>The app looks good but can be even better with a few finishing touches. By adding a header and footer to our table view we can provide a bit more info to the user.</p><p>Let&#8217;s start by adding a simple header. Hit enter on line 28 then add the following on line 29:</p><p><code>titleForHeaderInSection</code> allows you to add a <code>String</code> that will appear above all the rows in our <code>UITableView</code>. Since we only have a single section we don&#8217;t need to worry about the <code>section</code> <code>Int</code> that this function provides us.</p><p>Something else that would be nice to provide users is a timestamp for when the request happened. We can put this in the footer of the table. Hit enter on line 32 then add the following to line 33 to add that:</p><p><code>DateFormatter</code> is an Apple API which allows you to take a <code>Date</code> instance and display it in a variety of different formats. To create a simple human-readable <code>Date</code> we set the <code>dateStyle</code> to <code>.long</code> and the <code>timeStyle</code> to <code>.medium</code>.</p><p>We then get an instance of <code>Date()</code> which returns the current <code>Date</code>. Like <code>NumberFormatter</code> we use the <code>string(from:)</code> method to extract a <code>String</code> from the formatter. Finally, we add the <code>String</code> &#8220;<em>Updated on </em>&#8221; to appear before the formatted date <code>String</code>.</p><p>Now run the app (&#8984;+R) again and it should look like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ja1f!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f41f69-e956-4cec-9bb0-e505c07cf196_700x1376.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ja1f!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f41f69-e956-4cec-9bb0-e505c07cf196_700x1376.png 424w, https://substackcdn.com/image/fetch/$s_!ja1f!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f41f69-e956-4cec-9bb0-e505c07cf196_700x1376.png 848w, https://substackcdn.com/image/fetch/$s_!ja1f!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f41f69-e956-4cec-9bb0-e505c07cf196_700x1376.png 1272w, https://substackcdn.com/image/fetch/$s_!ja1f!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f41f69-e956-4cec-9bb0-e505c07cf196_700x1376.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ja1f!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f41f69-e956-4cec-9bb0-e505c07cf196_700x1376.png" width="700" height="1376" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/61f41f69-e956-4cec-9bb0-e505c07cf196_700x1376.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1376,&quot;width&quot;:700,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&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_!ja1f!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f41f69-e956-4cec-9bb0-e505c07cf196_700x1376.png 424w, https://substackcdn.com/image/fetch/$s_!ja1f!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f41f69-e956-4cec-9bb0-e505c07cf196_700x1376.png 848w, https://substackcdn.com/image/fetch/$s_!ja1f!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f41f69-e956-4cec-9bb0-e505c07cf196_700x1376.png 1272w, https://substackcdn.com/image/fetch/$s_!ja1f!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f41f69-e956-4cec-9bb0-e505c07cf196_700x1376.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><strong>Conclusion</strong></h2><p>There you have it! If you had any trouble getting the app working you can download the final version <a href="https://github.com/allgamesallfree/CryptoTracker/tree/part2-end">here</a>. It has some added comments and documentation as well.</p><p>Thanks so much for taking the time to read this. If this tutorial helped you I would appreciate you holding down that &#128079; button below! If you&#8217;re a Github user a &#11088;&#65039; on the <a href="https://github.com/allgamesallfree/CryptoTracker/">CryptoTracker</a> Github page would be great too!</p>]]></content:encoded></item><item><title><![CDATA[How to get into Cryptocurrencies without going crazy]]></title><description><![CDATA[Cryptocurrencies like Bitcoin, Ethereum and Litecoin are exploding in value right now!]]></description><link>https://blog.maxste.in/p/how-to-get-into-cryptocurrencies</link><guid isPermaLink="false">https://blog.maxste.in/p/how-to-get-into-cryptocurrencies</guid><dc:creator><![CDATA[Max Stein]]></dc:creator><pubDate>Mon, 11 Mar 2024 00:53:51 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!g9mx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652911d2-0628-4927-ae3e-b2980b789d89_2000x857.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!g9mx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652911d2-0628-4927-ae3e-b2980b789d89_2000x857.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!g9mx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652911d2-0628-4927-ae3e-b2980b789d89_2000x857.webp 424w, https://substackcdn.com/image/fetch/$s_!g9mx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652911d2-0628-4927-ae3e-b2980b789d89_2000x857.webp 848w, https://substackcdn.com/image/fetch/$s_!g9mx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652911d2-0628-4927-ae3e-b2980b789d89_2000x857.webp 1272w, https://substackcdn.com/image/fetch/$s_!g9mx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652911d2-0628-4927-ae3e-b2980b789d89_2000x857.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!g9mx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652911d2-0628-4927-ae3e-b2980b789d89_2000x857.webp" width="1456" height="624" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/652911d2-0628-4927-ae3e-b2980b789d89_2000x857.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:624,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:40210,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!g9mx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652911d2-0628-4927-ae3e-b2980b789d89_2000x857.webp 424w, https://substackcdn.com/image/fetch/$s_!g9mx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652911d2-0628-4927-ae3e-b2980b789d89_2000x857.webp 848w, https://substackcdn.com/image/fetch/$s_!g9mx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652911d2-0628-4927-ae3e-b2980b789d89_2000x857.webp 1272w, https://substackcdn.com/image/fetch/$s_!g9mx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F652911d2-0628-4927-ae3e-b2980b789d89_2000x857.webp 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>Cryptocurrencies like Bitcoin, Ethereum and Litecoin are exploding in value right now! In the past month (as of writing in Nov 2017), Bitcoin went from $6,100 to now $11,175, an 83% gain! Ethereum is up 65%, and Litecoin is up 81%.</p><p>Investors are eager to jump in and buy some Cryptocurrencies. This has helped <a href="https://www.coinbase.com/join/59ae0a42a66a1d00c18a1d69">Coinbase</a> soar up the top free app charts on the App Store, it is currently the 22nd most popular 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_!DQSN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e76694-2d3e-4993-b5b5-731ce3320afe_1125x812.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DQSN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e76694-2d3e-4993-b5b5-731ce3320afe_1125x812.jpeg 424w, https://substackcdn.com/image/fetch/$s_!DQSN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e76694-2d3e-4993-b5b5-731ce3320afe_1125x812.jpeg 848w, https://substackcdn.com/image/fetch/$s_!DQSN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e76694-2d3e-4993-b5b5-731ce3320afe_1125x812.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!DQSN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e76694-2d3e-4993-b5b5-731ce3320afe_1125x812.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DQSN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e76694-2d3e-4993-b5b5-731ce3320afe_1125x812.jpeg" width="1125" height="812" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e1e76694-2d3e-4993-b5b5-731ce3320afe_1125x812.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:812,&quot;width&quot;:1125,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!DQSN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e76694-2d3e-4993-b5b5-731ce3320afe_1125x812.jpeg 424w, https://substackcdn.com/image/fetch/$s_!DQSN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e76694-2d3e-4993-b5b5-731ce3320afe_1125x812.jpeg 848w, https://substackcdn.com/image/fetch/$s_!DQSN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e76694-2d3e-4993-b5b5-731ce3320afe_1125x812.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!DQSN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1e76694-2d3e-4993-b5b5-731ce3320afe_1125x812.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></figure></div><p>Before jumping into the frenzy there are a few things you should keep in mind.</p><h2><strong>Prices will drop&#8230;. Eventually</strong></h2><p>Long-term followers of this market know the price of Cryptocurrencies such as Bitcoin fluctuates all the time. Due to the current excitement around the space, it&#8217;s possible that drop won&#8217;t happen right away. It could be days, weeks, or months from now but nobody can tell you with certainty when that will happen.</p><h2><strong>Prices will bounce back after dropping</strong></h2><p>The Cryptocurrency space has lots of uncertainty which leads to tremendous volatility. A few weeks ago on November 12th, the price dropped to a low of $5,519 after hitting an all-time high of $7,776, over a 40% drop. Many investors worried that Bitcoin Cash would become the new Bitcoin and sold in a panic.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UGgV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61c0b6a8-5e7a-4d14-bafd-1f8a15f7f3e5_1400x791.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UGgV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61c0b6a8-5e7a-4d14-bafd-1f8a15f7f3e5_1400x791.png 424w, https://substackcdn.com/image/fetch/$s_!UGgV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61c0b6a8-5e7a-4d14-bafd-1f8a15f7f3e5_1400x791.png 848w, https://substackcdn.com/image/fetch/$s_!UGgV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61c0b6a8-5e7a-4d14-bafd-1f8a15f7f3e5_1400x791.png 1272w, https://substackcdn.com/image/fetch/$s_!UGgV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61c0b6a8-5e7a-4d14-bafd-1f8a15f7f3e5_1400x791.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UGgV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61c0b6a8-5e7a-4d14-bafd-1f8a15f7f3e5_1400x791.png" width="1400" height="791" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/61c0b6a8-5e7a-4d14-bafd-1f8a15f7f3e5_1400x791.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:791,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&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_!UGgV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61c0b6a8-5e7a-4d14-bafd-1f8a15f7f3e5_1400x791.png 424w, https://substackcdn.com/image/fetch/$s_!UGgV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61c0b6a8-5e7a-4d14-bafd-1f8a15f7f3e5_1400x791.png 848w, https://substackcdn.com/image/fetch/$s_!UGgV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61c0b6a8-5e7a-4d14-bafd-1f8a15f7f3e5_1400x791.png 1272w, https://substackcdn.com/image/fetch/$s_!UGgV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61c0b6a8-5e7a-4d14-bafd-1f8a15f7f3e5_1400x791.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">Price Drop on November 12th &#8212; <a href="https://coinmarketcap.com/currencies/bitcoin/">https://coinmarketcap.com/currencies/bitcoin/</a></figcaption></figure></div><p>If you are not reactionary and let the fluctuations happen, good things are ahead. The blockchain technology is revolutionary. Like the early days of the Internet companies are only starting to learn about its utility and put it to use. There will be many drops and rises along that time. If you can stay on for the ride good times are ahead in 2018 and beyond.</p><h2><strong>Regarding Altcoins</strong></h2><p>Bitcoin and Ethereum are the gateways to a vibrant Cryptocurrency space. That space now has over 1,000 different coins with more entering the market daily. These coins are exciting and some of them will very likely end up being worth far more than they are today. Though it is much riskier to start with these.</p><p>My advice is to start with Bitcoin and Ethereum to get a feel for the market. If you want some Altcoins still, later on, do some research into several coins.</p><p>Put 10&#8211;20% of your Cryptocurrency portfolio in some of these projects. Try to spread that between several Altcoins instead of focusing on one to limit your risk.</p><h2><strong>Where to get started</strong></h2><p>I recommend using <a href="https://www.coinbase.com/join/59ae0a42a66a1d00c18a1d69">Coinbase</a>, it is free to sign up and they make it very simple to get started. You will have to verify your identity and your bank account. Once you do you can start buying Cryptocurrencies right away.</p><p>It will take 5&#8211;10 days after buying a Cryptocurrency from <a href="https://www.coinbase.com/join/59ae0a42a66a1d00c18a1d69">Coinbase</a> for it to actually appear in your account. The price that you bought it at gets locked in at the time of purchase.</p><h2><strong>Summary</strong></h2><ul><li><p>Don&#8217;t invest more than you&#8217;re willing to lose</p></li><li><p>Start with Bitcoin, Ethereum, and Litecoin.</p></li><li><p>Use <a href="https://www.coinbase.com/join/59ae0a42a66a1d00c18a1d69">Coinbase</a> to get started</p></li><li><p>Ignore short-term market fluctuations, focus on long-term goals</p></li><li><p>If you find Altcoins you like research them. Keep these to 10&#8211;20% of your portfolio</p></li></ul><p>These are exciting times in the Cryptocurrency space! People are fascinated with Cryptocurrencies and everyday investors are now jumping in. The blockchain technology is still in its infancy though and much of the innovation in the space is ahead of us.</p>]]></content:encoded></item><item><title><![CDATA[A better way to record your iPhone]]></title><description><![CDATA[When you want to create a trailer for your app or report a bug it&#8217;s often helpful to record your screen.]]></description><link>https://blog.maxste.in/p/a-better-way-to-record-your-iphone</link><guid isPermaLink="false">https://blog.maxste.in/p/a-better-way-to-record-your-iphone</guid><dc:creator><![CDATA[Max Stein]]></dc:creator><pubDate>Mon, 11 Mar 2024 00:50:15 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!__vd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57ca99e5-e2d8-4460-927d-51b89e642a35_1400x646.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_!__vd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57ca99e5-e2d8-4460-927d-51b89e642a35_1400x646.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!__vd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57ca99e5-e2d8-4460-927d-51b89e642a35_1400x646.gif 424w, https://substackcdn.com/image/fetch/$s_!__vd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57ca99e5-e2d8-4460-927d-51b89e642a35_1400x646.gif 848w, https://substackcdn.com/image/fetch/$s_!__vd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57ca99e5-e2d8-4460-927d-51b89e642a35_1400x646.gif 1272w, https://substackcdn.com/image/fetch/$s_!__vd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57ca99e5-e2d8-4460-927d-51b89e642a35_1400x646.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!__vd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57ca99e5-e2d8-4460-927d-51b89e642a35_1400x646.gif" width="1400" height="646" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/57ca99e5-e2d8-4460-927d-51b89e642a35_1400x646.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:646,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:663336,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!__vd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57ca99e5-e2d8-4460-927d-51b89e642a35_1400x646.gif 424w, https://substackcdn.com/image/fetch/$s_!__vd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57ca99e5-e2d8-4460-927d-51b89e642a35_1400x646.gif 848w, https://substackcdn.com/image/fetch/$s_!__vd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57ca99e5-e2d8-4460-927d-51b89e642a35_1400x646.gif 1272w, https://substackcdn.com/image/fetch/$s_!__vd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57ca99e5-e2d8-4460-927d-51b89e642a35_1400x646.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></figure></div><p>When you want to create a trailer for your app or report a bug it&#8217;s often helpful to record your screen.</p><p>It&#8217;s ideal to be able to do this on your iPhone rather than needing other devices. iOS 11 added a new feature letting you record your screen right<br>from the Control Center.</p><p>The main annoyance with this feature is you can&#8217;t see where your tapping, making the video harder to follow:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9dvE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ac54bf3-6d5a-4e0b-bd21-bec52352c777_300x650.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9dvE!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ac54bf3-6d5a-4e0b-bd21-bec52352c777_300x650.gif 424w, https://substackcdn.com/image/fetch/$s_!9dvE!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ac54bf3-6d5a-4e0b-bd21-bec52352c777_300x650.gif 848w, https://substackcdn.com/image/fetch/$s_!9dvE!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ac54bf3-6d5a-4e0b-bd21-bec52352c777_300x650.gif 1272w, https://substackcdn.com/image/fetch/$s_!9dvE!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ac54bf3-6d5a-4e0b-bd21-bec52352c777_300x650.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9dvE!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ac54bf3-6d5a-4e0b-bd21-bec52352c777_300x650.gif" width="320" height="693.3333333333334" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0ac54bf3-6d5a-4e0b-bd21-bec52352c777_300x650.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:650,&quot;width&quot;:300,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!9dvE!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ac54bf3-6d5a-4e0b-bd21-bec52352c777_300x650.gif 424w, https://substackcdn.com/image/fetch/$s_!9dvE!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ac54bf3-6d5a-4e0b-bd21-bec52352c777_300x650.gif 848w, https://substackcdn.com/image/fetch/$s_!9dvE!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ac54bf3-6d5a-4e0b-bd21-bec52352c777_300x650.gif 1272w, https://substackcdn.com/image/fetch/$s_!9dvE!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ac54bf3-6d5a-4e0b-bd21-bec52352c777_300x650.gif 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">iOS 11 screen recording</figcaption></figure></div><p>But with a change in Settings, you can customize this feature to show specifically where you tap on the screen, making the video easier to follow.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3giL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9204d415-8c6b-4289-bb7c-b5b77602f95e_300x650.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3giL!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9204d415-8c6b-4289-bb7c-b5b77602f95e_300x650.gif 424w, https://substackcdn.com/image/fetch/$s_!3giL!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9204d415-8c6b-4289-bb7c-b5b77602f95e_300x650.gif 848w, https://substackcdn.com/image/fetch/$s_!3giL!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9204d415-8c6b-4289-bb7c-b5b77602f95e_300x650.gif 1272w, https://substackcdn.com/image/fetch/$s_!3giL!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9204d415-8c6b-4289-bb7c-b5b77602f95e_300x650.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3giL!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9204d415-8c6b-4289-bb7c-b5b77602f95e_300x650.gif" width="320" height="693.3333333333334" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9204d415-8c6b-4289-bb7c-b5b77602f95e_300x650.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:650,&quot;width&quot;:300,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!3giL!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9204d415-8c6b-4289-bb7c-b5b77602f95e_300x650.gif 424w, https://substackcdn.com/image/fetch/$s_!3giL!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9204d415-8c6b-4289-bb7c-b5b77602f95e_300x650.gif 848w, https://substackcdn.com/image/fetch/$s_!3giL!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9204d415-8c6b-4289-bb7c-b5b77602f95e_300x650.gif 1272w, https://substackcdn.com/image/fetch/$s_!3giL!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9204d415-8c6b-4289-bb7c-b5b77602f95e_300x650.gif 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">iOS 11 screen recording with taps visualized</figcaption></figure></div><p>To do so you&#8217;ll need two things:</p><ol><li><p>Screen Recording added to the Control Center</p></li><li><p>AssistiveTouch with a custom tap gesture</p></li></ol><h2><strong>Tutorial</strong></h2><p>You can follow this quick video to walk you through the process of enabling these two features:</p><div id="youtube2--6uNKntLL94" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;-6uNKntLL94&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/-6uNKntLL94?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>And there you go! Now you can record your iPhone and visualize your taps. Tap the red icon on the top left to stop recording on iPhone X or the red status bar on previous iPhone models.</p><p>There are some limitations to this approach, they are as follows:</p><ul><li><p>You cannot swipe or do multitouch gestures, only single taps</p></li><li><p>If you leave the current app and open a different one the tap indicator<br>will go away.</p></li></ul><p>Not perfect, but for many use cases it&#8217;s quite handy!</p><p><strong>If this article helped you I&#8217;d love if you held down that clap button below<br>so more people can learn this trick.</strong></p>]]></content:encoded></item><item><title><![CDATA[How to boost your App Store rating with a simple, easy approach]]></title><description><![CDATA[Users love to see high app ratings when deciding which apps to download.]]></description><link>https://blog.maxste.in/p/how-to-boost-your-app-store-rating</link><guid isPermaLink="false">https://blog.maxste.in/p/how-to-boost-your-app-store-rating</guid><dc:creator><![CDATA[Max Stein]]></dc:creator><pubDate>Mon, 11 Mar 2024 00:48:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!aSn1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38d7ff38-247a-4009-8891-3749dfeb4979_1400x1238.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aSn1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38d7ff38-247a-4009-8891-3749dfeb4979_1400x1238.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aSn1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38d7ff38-247a-4009-8891-3749dfeb4979_1400x1238.webp 424w, https://substackcdn.com/image/fetch/$s_!aSn1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38d7ff38-247a-4009-8891-3749dfeb4979_1400x1238.webp 848w, https://substackcdn.com/image/fetch/$s_!aSn1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38d7ff38-247a-4009-8891-3749dfeb4979_1400x1238.webp 1272w, https://substackcdn.com/image/fetch/$s_!aSn1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38d7ff38-247a-4009-8891-3749dfeb4979_1400x1238.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aSn1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38d7ff38-247a-4009-8891-3749dfeb4979_1400x1238.webp" width="1400" height="1238" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/38d7ff38-247a-4009-8891-3749dfeb4979_1400x1238.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1238,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:90910,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!aSn1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38d7ff38-247a-4009-8891-3749dfeb4979_1400x1238.webp 424w, https://substackcdn.com/image/fetch/$s_!aSn1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38d7ff38-247a-4009-8891-3749dfeb4979_1400x1238.webp 848w, https://substackcdn.com/image/fetch/$s_!aSn1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38d7ff38-247a-4009-8891-3749dfeb4979_1400x1238.webp 1272w, https://substackcdn.com/image/fetch/$s_!aSn1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38d7ff38-247a-4009-8891-3749dfeb4979_1400x1238.webp 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>Users love to see high app ratings when deciding which apps to download. If two apps do the same thing, but one has a higher rating than the other, which one do you think most users would choose?</p><p>Several of the most popular apps in the App Store have seen their ratings jump from the 3.5&#8211;4.5 range up to 4.8&#8211;5.0. At the same time, they&#8217;re also seeing their review count jump from 5,000&#8211;15,000 reviewers into the 100,000&#8211;1,000,000 range!</p><p>For example, let&#8217;s have a look at Instagram:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!p4wQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8dcc61-8de0-4c4c-bf36-c603fbf2cf3e_750x442.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!p4wQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8dcc61-8de0-4c4c-bf36-c603fbf2cf3e_750x442.png 424w, https://substackcdn.com/image/fetch/$s_!p4wQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8dcc61-8de0-4c4c-bf36-c603fbf2cf3e_750x442.png 848w, https://substackcdn.com/image/fetch/$s_!p4wQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8dcc61-8de0-4c4c-bf36-c603fbf2cf3e_750x442.png 1272w, https://substackcdn.com/image/fetch/$s_!p4wQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8dcc61-8de0-4c4c-bf36-c603fbf2cf3e_750x442.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!p4wQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8dcc61-8de0-4c4c-bf36-c603fbf2cf3e_750x442.png" width="750" height="442" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cb8dcc61-8de0-4c4c-bf36-c603fbf2cf3e_750x442.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:442,&quot;width&quot;:750,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!p4wQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8dcc61-8de0-4c4c-bf36-c603fbf2cf3e_750x442.png 424w, https://substackcdn.com/image/fetch/$s_!p4wQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8dcc61-8de0-4c4c-bf36-c603fbf2cf3e_750x442.png 848w, https://substackcdn.com/image/fetch/$s_!p4wQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8dcc61-8de0-4c4c-bf36-c603fbf2cf3e_750x442.png 1272w, https://substackcdn.com/image/fetch/$s_!p4wQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8dcc61-8de0-4c4c-bf36-c603fbf2cf3e_750x442.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">Instagram on the iOS 11 App Store</figcaption></figure></div><p>4.8 stars from over 580,000 reviewers. But Instagram is a huge app, so it&#8217;s not hard to see why so many people would have rated it.</p><p>Let&#8217;s take a look at any even larger app than Instagram &#8212; Facebook:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Pz6I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd2dbe40-129e-4042-9c95-c26bbeb0c946_750x442.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Pz6I!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd2dbe40-129e-4042-9c95-c26bbeb0c946_750x442.png 424w, https://substackcdn.com/image/fetch/$s_!Pz6I!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd2dbe40-129e-4042-9c95-c26bbeb0c946_750x442.png 848w, https://substackcdn.com/image/fetch/$s_!Pz6I!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd2dbe40-129e-4042-9c95-c26bbeb0c946_750x442.png 1272w, https://substackcdn.com/image/fetch/$s_!Pz6I!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd2dbe40-129e-4042-9c95-c26bbeb0c946_750x442.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Pz6I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd2dbe40-129e-4042-9c95-c26bbeb0c946_750x442.png" width="750" height="442" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd2dbe40-129e-4042-9c95-c26bbeb0c946_750x442.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:442,&quot;width&quot;:750,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Pz6I!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd2dbe40-129e-4042-9c95-c26bbeb0c946_750x442.png 424w, https://substackcdn.com/image/fetch/$s_!Pz6I!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd2dbe40-129e-4042-9c95-c26bbeb0c946_750x442.png 848w, https://substackcdn.com/image/fetch/$s_!Pz6I!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd2dbe40-129e-4042-9c95-c26bbeb0c946_750x442.png 1272w, https://substackcdn.com/image/fetch/$s_!Pz6I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd2dbe40-129e-4042-9c95-c26bbeb0c946_750x442.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">Facebook on the iOS 11 App Store</figcaption></figure></div><p>Facebook has a 3.0 star rating from only 14,500 users. How did Instagram get 40 times more users to rate its app when Facebook has <a href="https://techcrunch.com/2017/06/27/facebook-2-billion-users/">so many more users</a> than Instagram?</p><h1><strong>Apple&#8217;s rating prompt</strong></h1><p>The answer is the strategic placement of <a href="https://developer.apple.com/documentation/storekit/skstorereviewcontroller">Apple&#8217;s native rating prompt</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_!dU-c!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0de9b72-bc10-436c-92b1-c1355c624bd7_986x1758.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dU-c!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0de9b72-bc10-436c-92b1-c1355c624bd7_986x1758.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dU-c!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0de9b72-bc10-436c-92b1-c1355c624bd7_986x1758.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dU-c!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0de9b72-bc10-436c-92b1-c1355c624bd7_986x1758.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dU-c!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0de9b72-bc10-436c-92b1-c1355c624bd7_986x1758.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dU-c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0de9b72-bc10-436c-92b1-c1355c624bd7_986x1758.jpeg" width="986" height="1758" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a0de9b72-bc10-436c-92b1-c1355c624bd7_986x1758.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1758,&quot;width&quot;:986,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&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_!dU-c!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0de9b72-bc10-436c-92b1-c1355c624bd7_986x1758.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dU-c!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0de9b72-bc10-436c-92b1-c1355c624bd7_986x1758.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dU-c!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0de9b72-bc10-436c-92b1-c1355c624bd7_986x1758.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dU-c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0de9b72-bc10-436c-92b1-c1355c624bd7_986x1758.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>Before this native solution existed, developers had to take users to the App Store to rate their Apps. Now with Apple&#8217;s solution, users can tap the rating they want, tap submit, and they&#8217;re done!</p><p>It&#8217;s available for iOS 10.3 and above &#8212; so your iOS 10 users won&#8217;t get left behind.</p><p>The prompt is very easy to add and only takes a couple lines of code:</p><pre><code>// Add this near the top of your file
import StoreKit// Put this where you want the review prompt to appear
SKStoreReviewController.requestReview()</code></pre><h2><strong>Making good use of the prompt</strong></h2><p>Before you jump in and paste this anywhere in your app, you need to consider your customer base. Where in your app can you show this prompt that will allow users to engage with it in a positive way?</p><p>There&#8217;s no one right answer to this question, but here are some ideas:</p><ul><li><p>For shopping apps &#8212; after one or more successful transactions.</p></li><li><p>For content consumption apps &#8212; after a certain period of time. Or, after X number of songs/videos/books have finished.</p></li><li><p>For social networking apps &#8212; after a user creates content. Or, when a user engages with X number of other peoples&#8217; content.</p></li></ul><h2><strong>Things to keep in mind</strong></h2><p>&#8220;Because this method may or may not present an alert, it&#8217;s not appropriate to call it in response to a button tap or other user action.&#8221;<br><a href="https://developer.apple.com/documentation/storekit/skstorereviewcontroller/2851536-requestreview">https://developer.apple.com/documentation/storekit/skstorereviewcontroller/2851536-requestreview</a></p><p><code>requestReview()</code> will return a prompt based on App Store policy governed by Apple. You should not present an alert beforehand asking customers if they&#8217;re enjoying your app. If you do there&#8217;s a possibility they won&#8217;t see a rating prompt resulting in a bad user experience.</p><p>&#8220;You can prompt for ratings up to three times in a 365-day period.&#8221;<br>&#8212; <a href="https://developer.apple.com/app-store/ratings-and-reviews/">https://developer.apple.com/app-store/ratings-and-reviews/</a></p><p>The rating prompt will only appear to a user up to three times a year, even if they update your app.</p><p>This isn&#8217;t as much of a problem as it was in previous versions of iOS. Starting with iOS 11, Apple changed the way ratings are reset on the App Store.</p><p>In the past, every time you submitted a new build to the App Store, your ratings would get reset. Now you have the option to keep your rating history. So if you&#8217;re happy with your rating, you can keep it!</p><p>Getting a high rating on the App Store is one of the most effective ways to increase your downloads. Apple now provides an easy, native, and efficient way to boost your app&#8217;s rating. Take advantage of it in a clever way and you&#8217;ll definitely see results.</p><p><strong>If you liked this story I would love it if you&#8217;d click the &#128079; button below so more people can find out about it. Feel free to share in the responses as well if you used this prompt in your app!</strong></p>]]></content:encoded></item><item><title><![CDATA[iPhone X: The first true @3x device]]></title><description><![CDATA[Well the long rumored iPhone X is officially unveiled and it comes with a laundry list of extremely impressive specs.]]></description><link>https://blog.maxste.in/p/iphone-x-the-first-true-3x-device</link><guid isPermaLink="false">https://blog.maxste.in/p/iphone-x-the-first-true-3x-device</guid><dc:creator><![CDATA[Max Stein]]></dc:creator><pubDate>Mon, 11 Mar 2024 00:47:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!t3ZR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03ab72d-a370-4e09-9364-5e3f38ba16ec_1400x800.webp" 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_!t3ZR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03ab72d-a370-4e09-9364-5e3f38ba16ec_1400x800.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!t3ZR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03ab72d-a370-4e09-9364-5e3f38ba16ec_1400x800.webp 424w, https://substackcdn.com/image/fetch/$s_!t3ZR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03ab72d-a370-4e09-9364-5e3f38ba16ec_1400x800.webp 848w, https://substackcdn.com/image/fetch/$s_!t3ZR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03ab72d-a370-4e09-9364-5e3f38ba16ec_1400x800.webp 1272w, https://substackcdn.com/image/fetch/$s_!t3ZR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03ab72d-a370-4e09-9364-5e3f38ba16ec_1400x800.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!t3ZR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03ab72d-a370-4e09-9364-5e3f38ba16ec_1400x800.webp" width="1400" height="800" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e03ab72d-a370-4e09-9364-5e3f38ba16ec_1400x800.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:800,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:30882,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!t3ZR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03ab72d-a370-4e09-9364-5e3f38ba16ec_1400x800.webp 424w, https://substackcdn.com/image/fetch/$s_!t3ZR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03ab72d-a370-4e09-9364-5e3f38ba16ec_1400x800.webp 848w, https://substackcdn.com/image/fetch/$s_!t3ZR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03ab72d-a370-4e09-9364-5e3f38ba16ec_1400x800.webp 1272w, https://substackcdn.com/image/fetch/$s_!t3ZR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03ab72d-a370-4e09-9364-5e3f38ba16ec_1400x800.webp 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>Well the long rumored iPhone X is officially unveiled and it comes with a laundry list of extremely impressive specs. One of the most interesting things to note though is the new 5.8 inch &#8220;<em>Super-Retina</em>&#8221; display. It has a screen resolution of 1125px &#215; 2436px. This is a particularly interesting resolution choice since according to Apple&#8217;s <a href="https://developer.apple.com/ios/human-interface-guidelines/overview/iphone-x/">Human Interface Guidelines</a> it&#8217;s an @3x screen with an effective 375 x 812 visual points of screen available.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NLh_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf9b3f58-1ed6-48ff-846e-19215c5a0248_1400x780.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NLh_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf9b3f58-1ed6-48ff-846e-19215c5a0248_1400x780.png 424w, https://substackcdn.com/image/fetch/$s_!NLh_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf9b3f58-1ed6-48ff-846e-19215c5a0248_1400x780.png 848w, https://substackcdn.com/image/fetch/$s_!NLh_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf9b3f58-1ed6-48ff-846e-19215c5a0248_1400x780.png 1272w, https://substackcdn.com/image/fetch/$s_!NLh_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf9b3f58-1ed6-48ff-846e-19215c5a0248_1400x780.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NLh_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf9b3f58-1ed6-48ff-846e-19215c5a0248_1400x780.png" width="1400" height="780" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cf9b3f58-1ed6-48ff-846e-19215c5a0248_1400x780.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:780,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!NLh_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf9b3f58-1ed6-48ff-846e-19215c5a0248_1400x780.png 424w, https://substackcdn.com/image/fetch/$s_!NLh_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf9b3f58-1ed6-48ff-846e-19215c5a0248_1400x780.png 848w, https://substackcdn.com/image/fetch/$s_!NLh_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf9b3f58-1ed6-48ff-846e-19215c5a0248_1400x780.png 1272w, https://substackcdn.com/image/fetch/$s_!NLh_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf9b3f58-1ed6-48ff-846e-19215c5a0248_1400x780.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">iPhone 6/6S/7 left, iPhone X right via Human Interface guidelines</figcaption></figure></div><p>Basically what this means for user&#8217;s is they&#8217;ll get the same content they were getting before on an iPhone 6 sized device just with 20% additional screen height and a bump from @2x resolution to @3x.</p><p>You may be thinking well what about Apple&#8217;s iPhone plus (6+, 6S+, 7+, 8+) line? Those have been &#8220;<em>true</em>&#8221; @3x devices for years now right? Well not quite. Following Paintcode app&#8217;s &#8220;<em><a href="https://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions">Ultimate Guide To iPhone Resolutions</a></em>&#8221; which has been updated to include the new iPhone X the 6 Plus takes a @3x effective resolution than downsamples it to fit the physical pixels on the screen.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0C7T!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F186e6704-9872-47df-9f62-3e381092e1fd_443x851.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0C7T!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F186e6704-9872-47df-9f62-3e381092e1fd_443x851.png 424w, https://substackcdn.com/image/fetch/$s_!0C7T!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F186e6704-9872-47df-9f62-3e381092e1fd_443x851.png 848w, https://substackcdn.com/image/fetch/$s_!0C7T!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F186e6704-9872-47df-9f62-3e381092e1fd_443x851.png 1272w, https://substackcdn.com/image/fetch/$s_!0C7T!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F186e6704-9872-47df-9f62-3e381092e1fd_443x851.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0C7T!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F186e6704-9872-47df-9f62-3e381092e1fd_443x851.png" width="443" height="851" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/186e6704-9872-47df-9f62-3e381092e1fd_443x851.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:851,&quot;width&quot;:443,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!0C7T!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F186e6704-9872-47df-9f62-3e381092e1fd_443x851.png 424w, https://substackcdn.com/image/fetch/$s_!0C7T!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F186e6704-9872-47df-9f62-3e381092e1fd_443x851.png 848w, https://substackcdn.com/image/fetch/$s_!0C7T!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F186e6704-9872-47df-9f62-3e381092e1fd_443x851.png 1272w, https://substackcdn.com/image/fetch/$s_!0C7T!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F186e6704-9872-47df-9f62-3e381092e1fd_443x851.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>What this means for user&#8217;s is this is the first device that they will truly see the full visual fidelity of @3x elements on their screens. For developers it means now is as good a time as an any to jump on the @3x support bandwagon. It&#8217;s likely you are already providing @2x and @3x versions of your assets though in which case you&#8217;re all set for supporting the full display capabilities of the iPhone X.</p><p>For flat/simple vector assets its recommended to bring them into Xcode as PDF&#8217;s and let Xcode scale these into 1x/2x/3x assets for you. Starting with Xcode 9 this is easier than ever to use since there is a new option to preserve vector data. That means not only can it handle scaling for different devices but your assets can be upsized or downsized without any loss in quality. To take advantage of this new feature you can follow <a href="http://martiancraft.com/blog/2017/06/xcode9-assets/">this guide.</a></p><p>The iPhone X represents a significant departure from Apple&#8217;s strategy for the last couple of years of delivering iterative improvements with minimal design changes to their flagship device. What are your thoughts on supporting this device in your app&#8217;s going forward?</p><p><a href="https://medium.com/tag/ios?source=post_page-----dcc12f884c75---------------ios-----------------">IOS</a></p><p><a href="https://medium.com/tag/iphone?source=post_page-----dcc12f884c75---------------iphone-----------------">IPhone</a></p><p><a href="https://medium.com/tag/xcode?source=post_page-----dcc12f884c75---------------xcode-----------------">Xcode</a></p><p><a href="https://medium.com/tag/vector?source=post_page-----dcc12f884c75---------------vector-----------------">Vector</a></p>]]></content:encoded></item><item><title><![CDATA[Easily define UIColors in Swift]]></title><description><![CDATA[Convenience initializers can make things much more simple]]></description><link>https://blog.maxste.in/p/easily-define-uicolors-in-swift</link><guid isPermaLink="false">https://blog.maxste.in/p/easily-define-uicolors-in-swift</guid><dc:creator><![CDATA[Max Stein]]></dc:creator><pubDate>Mon, 11 Mar 2024 00:46:13 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!1ksz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952ff9cf-4870-4c53-ba83-32de94b482bb_1400x800.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1ksz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952ff9cf-4870-4c53-ba83-32de94b482bb_1400x800.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1ksz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952ff9cf-4870-4c53-ba83-32de94b482bb_1400x800.webp 424w, https://substackcdn.com/image/fetch/$s_!1ksz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952ff9cf-4870-4c53-ba83-32de94b482bb_1400x800.webp 848w, https://substackcdn.com/image/fetch/$s_!1ksz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952ff9cf-4870-4c53-ba83-32de94b482bb_1400x800.webp 1272w, https://substackcdn.com/image/fetch/$s_!1ksz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952ff9cf-4870-4c53-ba83-32de94b482bb_1400x800.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1ksz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952ff9cf-4870-4c53-ba83-32de94b482bb_1400x800.webp" width="1400" height="800" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/952ff9cf-4870-4c53-ba83-32de94b482bb_1400x800.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:800,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:8528,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1ksz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952ff9cf-4870-4c53-ba83-32de94b482bb_1400x800.webp 424w, https://substackcdn.com/image/fetch/$s_!1ksz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952ff9cf-4870-4c53-ba83-32de94b482bb_1400x800.webp 848w, https://substackcdn.com/image/fetch/$s_!1ksz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952ff9cf-4870-4c53-ba83-32de94b482bb_1400x800.webp 1272w, https://substackcdn.com/image/fetch/$s_!1ksz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952ff9cf-4870-4c53-ba83-32de94b482bb_1400x800.webp 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>When doing the front end for our iOS applications we often have to initialize colors. You&#8217;ve probably written a lot of code that looks like this in your classes:</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.maxste.in/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Maxwell&#8217;s Substack! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Writing this over and over again can become incredibly tedious. When developing a large scale iOS application you may be initializing colors in this manner dozens of times.</p><h2><strong>Enter Convenience Initializers</strong></h2><p>Like with many technical problems in Swift we do have a simpler solution, the convenience initializer.</p><p>What it does essentially is allow you to call an existing initializer with your own set of parameters. Heres one example to make our UIColor&#8217;s a tad bit easier to initialize:</p><p>And now we can initialize our colors from before like this:</p><p>Ahh, much better, no more dividing by 255 every time! Also, by shrinking the commonly understood words red, green, and blue to r, g, and b we have a much more simple initialization. But we can enhance this a bit more.</p><h2><strong>Tightening up our solution</strong></h2><p>This works but we can do more. What if we don&#8217;t want to keep writing alpha 1.0 over and over when most of our colors are 100% alpha? Lets make that an optional parameter:</p><p>Now we can initialize with either an alpha value of our choice or if its supposed to be 100% we don&#8217;t need to fill in alpha at all.</p><p>This is better but I think its important we try to write our code with as little repetition as possible. Casting 3 integers to CGFloat and dividing each by 255 seems silly when we can write a little inline function to do that task:</p><p>Our new inline function takes our int value, casts it to CGFloat, divides it by 255 and returns the CGFloat value we need for each of the corresponding red, green, and blue values.</p><p>Now if Apple decides to change the way UIColor&#8217;s are initialized in later versions of Swift instead of updating that functionality in 3 places we have one method where we can take care of things.</p><p>Lets take a look at how we can initialize our 3 colors now:</p><p>Much, much shorter than the initializer we started with! You can use these same principles to simplify other initializers throughout UIKit or even your own classes.</p><p>You can find the full source code for this tutorial on my github here:</p><p><a href="https://github.com/allgamesallfree/convenient-uicolors">https://github.com/allgamesallfree/convenient-uicolors</a></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.maxste.in/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Maxwell&#8217;s Substack! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Build an Ethereum/Bitcoin price tracking app in Swift (Part 1)]]></title><description><![CDATA[Ethereum, Bitcoin, and cryptocurrencies at large have been exploding in value lately.]]></description><link>https://blog.maxste.in/p/build-an-ethereumbitcoin-price-tracking</link><guid isPermaLink="false">https://blog.maxste.in/p/build-an-ethereumbitcoin-price-tracking</guid><dc:creator><![CDATA[Max Stein]]></dc:creator><pubDate>Mon, 11 Mar 2024 00:42:23 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!6Jgm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00591bd4-a39c-4697-8501-d79579f13d60_1400x800.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6Jgm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00591bd4-a39c-4697-8501-d79579f13d60_1400x800.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6Jgm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00591bd4-a39c-4697-8501-d79579f13d60_1400x800.webp 424w, https://substackcdn.com/image/fetch/$s_!6Jgm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00591bd4-a39c-4697-8501-d79579f13d60_1400x800.webp 848w, https://substackcdn.com/image/fetch/$s_!6Jgm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00591bd4-a39c-4697-8501-d79579f13d60_1400x800.webp 1272w, https://substackcdn.com/image/fetch/$s_!6Jgm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00591bd4-a39c-4697-8501-d79579f13d60_1400x800.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6Jgm!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00591bd4-a39c-4697-8501-d79579f13d60_1400x800.webp" width="1200" height="685.7142857142857" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/00591bd4-a39c-4697-8501-d79579f13d60_1400x800.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:800,&quot;width&quot;:1400,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:45024,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6Jgm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00591bd4-a39c-4697-8501-d79579f13d60_1400x800.webp 424w, https://substackcdn.com/image/fetch/$s_!6Jgm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00591bd4-a39c-4697-8501-d79579f13d60_1400x800.webp 848w, https://substackcdn.com/image/fetch/$s_!6Jgm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00591bd4-a39c-4697-8501-d79579f13d60_1400x800.webp 1272w, https://substackcdn.com/image/fetch/$s_!6Jgm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00591bd4-a39c-4697-8501-d79579f13d60_1400x800.webp 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>Ethereum, Bitcoin, and cryptocurrencies at large have been exploding in value lately. Even if you&#8217;re not invested in cryptocurrencies yourself now is a great time to learn how to program apps that leverage them.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.maxste.in/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Maxwell&#8217;s Substack! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Today we will be building a very simple Ethereum/Bitcoin price tracker in Swift 4 using <a href="https://itunes.apple.com/us/app/xcode/id497799835?mt=12">Xcode 9</a>. To get started download the base project <a href="https://github.com/allgamesallfree/CryptoTracker/archive/part1-start.zip">here</a> then open &#8220;<em>CryptoTracker.xcodeproj</em>&#8221;.</p><p>Try running the app (&#8984;+R) in the iOS Simulator and you&#8217;ll notice the text &#8220;<em>$0.00</em>&#8221; with &#8220;<em>Ethereum Price</em>&#8221; under it. If you select &#8220;<em>Main.storyboard</em>&#8221; from the projects pane on the left-hand side you&#8217;ll see we have a horizontally and vertically aligned stack view with the two labels. Select the &#8220;<em>$0.00</em>&#8221; label and reveal the connections inspector (&#8984;+<strong>&#8997;+</strong>6) and you&#8217;ll see it has a <code>@IBOutlet</code> connection to &#8220;<em>ViewController.swift</em>&#8221; with the name <code>etherValueLabel</code>. We will edit this label with the real value of the currency later.</p><h2><strong>Getting Connected</strong></h2><p>Our price tracker wouldn&#8217;t be very good without up to date information on prices. The best way to get this information is through the use of an API, and <a href="https://www.cryptocompare.com/api/#introduction">CryptoCompare</a> has a great one that supports numerous types of currencies.</p><p>For now, we want to use it to make an API call to get back Ethereum&#8217;s price in USD so we can display that in our app. Open up &#8220;<em>ViewController.swift</em>&#8221; from the projects pane and add the following below the <code>etherValueLabel</code><em> </em><code>@IBOutlet</code> at the top of the file:</p><pre><code>let apiURL = URL(string: "https://min-api.cryptocompare.com/data/price?fsym=ETH&amp;tsyms=USD")</code></pre><p>This is the API <code>URL</code> we will be connecting to in order to fetch the data we now read to write a GET request in order to retrieve the latest price information from this <code>URL</code>. Add the following function below the <code>didReceiveMemoryWarning</code> function:</p><p>Our function takes in a <code>URL</code> and has a completion block which returns an optional value. We will send this information back later when we complete our request or send back <code>nil</code> if there is an error.</p><p>On the first line, we perform a basic <code>dataTask</code> request that takes in the URL, this is done using Apple&#8217;s <a href="https://developer.apple.com/documentation/foundation/urlsession">URLSession API</a>. It returns data from the call, a response(which returns information about the call that was made), and an optional error in the event of failure.</p><p>We also do <code>request.resume()</code> at the end which actually starts the call. Up to this point though we are not doing anything with the information returned from the call, so replace the <code>TODO</code> with the following:</p><p>This confirms that the data we got back isn&#8217;t <code>nil</code> and that there weren&#8217;t any errors. In the else case we send back <code>nil</code> since no data was found and try to print the error, for safety we unwrap it using <code>?</code> to get back a description of the error and if no description is found we just print an empty <code>String</code>. The error should never be <code>nil</code> in this case but using optionals is a good habit to get into for writing safe code.</p><p>Now we have the data safely unwrapped and made sure there aren&#8217;t any errors, now its time to fetch the USD value from the JSON response we got back from the server. To do so add the following underneath the guard block we just added:</p><p>In order to read the JSON data in Swift, we use the <a href="https://developer.apple.com/documentation/foundation/jsonserialization">JSONSerialization</a> class from Apple, which takes JSON data and converts it into a dictionary which can be read in Swift. This must be done using a Swift try-catch block, which is why we need to add do at the beginning and catch to handle an error in the case that we aren&#8217;t able to get back the JSON data.</p><p>Once we have the dictionary we can start reading values, inside the JSON dictionary is the key &#8220;<em>USD&#8221; </em>which contains the US price of Ethereum as a number so we cast that value to <code>NSNumber</code>.</p><p>If for whatever reason we can&#8217;t get back the value we pass <code>nil</code> to the completion block again and return. If we do get the value back safely though we pass it to the completion block.</p><p>Next, we&#8217;ll write a small helper function that takes the value number and formats it to a US currency string. Add the following underneath the <code>makeValueGetRequest</code> function we just wrote:</p><p><a href="https://developer.apple.com/documentation/foundation/numberformatter">NumberFormatter</a> is a class from Apple that takes numbers and represents them in various text formats. By setting the <code>locale</code> to <code>en_us</code><em> </em>and the <code>numberStyle</code> to <code>.currency</code> we can use the <code>NumberFormatter</code> to represent the value in US dollars.</p><p>Now we need to unwrap the value passed into the <code>formatAsCurrencyString</code><em> </em>function to ensure it&#8217;s not <code>nil</code> and format it using the <code>NumberFormatter</code> instance we just created.</p><p>We unwrap the value using a guard and use the <code>NumberFormatter</code> string function which takes a <code>NSNumber</code> and converts it to a <code>String</code> following the formatter&#8217;s rules (which here was that we print a currency style <code>String</code> using US values). At the end, we return the <code>formattedCurrencyAmount</code> <code>String</code> which we can use to print that value on the screen.</p><p>Great! Now we can get a numerical value back from the API and we can format that value into US dollars. All that we have to do now is make the request and populate the on-screen <code>etherValueLabel</code> with the value.</p><p>Recall that in the beginning, we added the following line to store the <code>URL</code> for the <a href="https://www.cryptocompare.com/api/#">CryptoCompare API</a>:</p><pre><code>let apiURL = URL(string: "https://min-api.cryptocompare.com/data/price?fsym=ETH&amp;tsyms=USD")</code></pre><p>Now we want to use that <code>URL</code> to make a GET request for the data. Before we can use that <code>URL</code> though we first have to unwrap its value. By default, <code>URL</code> objects initialized with a <code>String</code> are optional since the <code>URL</code> could potentially return <code>nil</code> if the <code>String</code> resolves to an invalid web address.</p><p>To do so add the following under <code>super.viewDidLoad()</code> in your <code>viewDidLoad</code> function:</p><p>A quick, simple guard statement ensures <code>apiURL</code> on the left-hand side is safely unwrapped and ready to be used to fetch that data.</p><p>Recall that earlier we created the <code>makeValueGETRequest</code><em> </em>function which takes in a <code>URL</code> and has a completion block that returns the value of Ethereum as a number.</p><p>We can pass in the now unwrapped <code>apiURL</code> then we can use that <code>formatAsCurrencyString</code> function to convert that value to a <code>String</code> in US dollar currency format. Finally, we can display that <code>String</code> on the <code>etherValueLabel</code><em> </em>so the user&#8217;s of our app can see it.</p><p>We call the <code>makeValueGETRequest</code><em> </em>function we created earlier with our now unwrapped <code>apiURL</code><em> </em>and get back <code>value</code><em> </em>in <code>NSNumber</code> format which represents the cost of 1 ETH in US dollars.</p><p>For the next part, we have to use a <a href="https://developer.apple.com/documentation/dispatch/dispatchqueue">DispatchQueue</a>, a class provided by Apple to deal with multithreading. The <code>makeValueGETRequest</code><em> </em>performs the GET request in the background so that it won&#8217;t interrupt the main thread, which is used by iOS to update the UI on the screen. By doing this work in the background we can avoid interrupting any interface changes with our GET request.</p><p>To get back to the main thread using <a href="https://developer.apple.com/documentation/dispatch/dispatchqueue">DispatchQueue</a> we use <code>DispatchQueue.main.async</code> a method that creates a block where we can update the UI on the main thread after coming back from a background operation.</p><p>Once inside we assign the <code>etherValueLabel.text</code> with our value for 1 ETH in US dollars. The <code>??</code> after the <code>formatAsCurrencyString</code><em> </em>is known as <a href="https://www.hackingwithswift.com/example-code/language/what-is-the-nil-coalescing-operator">nil coalescing</a> which means since <code>formatAsCurrencyString</code><em> </em>returns an optional <code>String</code> (either the US dollars value or <code>nil</code> in the case of a failure), the <code>??</code> acts as an OR clause essentially which in the case of failure will simply print the <code>String</code> &#8220;<em>Failed</em>&#8221; to the user.</p><p>Whenever you&#8217;re dealing with API&#8217;s it&#8217;s always good to handle failure gracefully, there are many ways to do so and the <a href="https://www.hackingwithswift.com/example-code/language/what-is-the-nil-coalescing-operator">nil coalescing </a>operator is certainly a handy tool to keep in mind.</p><p>Try running the app (&#8984;+R) and you should now see the value of 1 ETH!</p><h2><strong>Whats Next?</strong></h2><p>You can download the final version of this project with some added comments <a href="https://github.com/allgamesallfree/CryptoTracker/tree/part1-end">here</a>.</p><p><strong>Update: </strong><a href="https://maxste.in/build-a-cryptocurrency-price-tracker-in-swift-f3ae74621730">part 2</a> is out now! Go check it out to learn how to build a more robust price tracker with Bitcoin, Ethereum, Litecoin, Monero, Ripple, and NEO support!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.maxste.in/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Maxwell&#8217;s Substack! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Easily distinguish between iPhone models]]></title><description><![CDATA[Want a block of code to only run on iPhone X? No problem]]></description><link>https://blog.maxste.in/p/easily-distinguish-between-iphone</link><guid isPermaLink="false">https://blog.maxste.in/p/easily-distinguish-between-iphone</guid><dc:creator><![CDATA[Max Stein]]></dc:creator><pubDate>Mon, 11 Mar 2024 00:35:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Wz1X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc78e0143-ac8e-4261-b07f-2b852d1b8ce5_1400x800.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Wz1X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc78e0143-ac8e-4261-b07f-2b852d1b8ce5_1400x800.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Wz1X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc78e0143-ac8e-4261-b07f-2b852d1b8ce5_1400x800.webp 424w, https://substackcdn.com/image/fetch/$s_!Wz1X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc78e0143-ac8e-4261-b07f-2b852d1b8ce5_1400x800.webp 848w, https://substackcdn.com/image/fetch/$s_!Wz1X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc78e0143-ac8e-4261-b07f-2b852d1b8ce5_1400x800.webp 1272w, https://substackcdn.com/image/fetch/$s_!Wz1X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc78e0143-ac8e-4261-b07f-2b852d1b8ce5_1400x800.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Wz1X!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc78e0143-ac8e-4261-b07f-2b852d1b8ce5_1400x800.webp" width="1200" height="685.7142857142857" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c78e0143-ac8e-4261-b07f-2b852d1b8ce5_1400x800.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:800,&quot;width&quot;:1400,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:28734,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Wz1X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc78e0143-ac8e-4261-b07f-2b852d1b8ce5_1400x800.webp 424w, https://substackcdn.com/image/fetch/$s_!Wz1X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc78e0143-ac8e-4261-b07f-2b852d1b8ce5_1400x800.webp 848w, https://substackcdn.com/image/fetch/$s_!Wz1X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc78e0143-ac8e-4261-b07f-2b852d1b8ce5_1400x800.webp 1272w, https://substackcdn.com/image/fetch/$s_!Wz1X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc78e0143-ac8e-4261-b07f-2b852d1b8ce5_1400x800.webp 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 thing that nearly all developers have to deal with when writing iOS applications is writing code that&#8217;s only intended to run on a particular iPhone model.</p><p>This is especially true of Apple&#8217;s new iPhone X which has a significantly taller, <a href="https://medium.com/ios-os-x-development/iphone-x-the-first-true-3x-device-dcc12f884c75">higher resolution display</a> than past devices, with a notch at the top and enlarged areas at the top and bottom.</p><p>In order to make it much easier to write code that only runs on the model&#8217;s you specify I created <a href="https://github.com/allgamesallfree/ScreenType">ScreenType</a>.</p><p>If you use <a href="https://cocoapods.org/pods/ScreenType">Cocoapods</a> you can install <a href="https://github.com/allgamesallfree/ScreenType">ScreenType</a> by adding the following line to your podfile:</p><p><code>pod 'ScreenType'</code></p><p>It can also be installed manually by importing <a href="https://github.com/allgamesallfree/ScreenType/blob/master/ScreenType/Classes/ScreenType.swift">ScreenType.swift</a> into your project.</p><h2><strong>How it works</strong></h2><p><code>ScreenType</code> is an enum with cases for all iPhone models ranging from iPhone 4 all the way up to iPhone X, as well as all iPad models including Apple&#8217;s new 10.5-inch iPads. It&#8217;s an <code>Int</code> type enum so we can do comparisons between <code>ScreenType</code>&#8217;s as you&#8217;ll see in the usage examples below.</p><p><code>ScreenType</code> also stores the value <code>current</code> as an <code>extension</code> to Apple&#8217;s <code>UIScreen</code> class as a <code>static var</code>. It gets the current screen type by comparing the longest side of the running device&#8217;s screen to the sizes of each iPhone and iPad model and returning the matching device.</p><p>For instance, the iPhone 4 has a screen that is 480pt&#8217;s tall so if the running device&#8217;s height is 480 than <code>current</code> will return a <code>ScreenType</code> of <code>iPhone4</code>. By calling <code>UIScreen.current</code> you can make comparisons easily between the running device and any iPhone / iPad model&#8217;s you would like.</p><h2><strong>ScreenType in Action</strong></h2><p>Here&#8217;s an animation of what the <a href="https://github.com/allgamesallfree/ScreenType/">ScreenType</a> sample project displays when launching on iPhone 8, iPhone X, and iPhone 8 Plus simulators, respectively:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3YGZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91f3f513-653a-4d16-94aa-81598f58130b_1150x796.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3YGZ!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91f3f513-653a-4d16-94aa-81598f58130b_1150x796.gif 424w, https://substackcdn.com/image/fetch/$s_!3YGZ!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91f3f513-653a-4d16-94aa-81598f58130b_1150x796.gif 848w, https://substackcdn.com/image/fetch/$s_!3YGZ!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91f3f513-653a-4d16-94aa-81598f58130b_1150x796.gif 1272w, https://substackcdn.com/image/fetch/$s_!3YGZ!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91f3f513-653a-4d16-94aa-81598f58130b_1150x796.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3YGZ!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91f3f513-653a-4d16-94aa-81598f58130b_1150x796.gif" width="1150" height="796" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/91f3f513-653a-4d16-94aa-81598f58130b_1150x796.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:796,&quot;width&quot;:1150,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&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_!3YGZ!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91f3f513-653a-4d16-94aa-81598f58130b_1150x796.gif 424w, https://substackcdn.com/image/fetch/$s_!3YGZ!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91f3f513-653a-4d16-94aa-81598f58130b_1150x796.gif 848w, https://substackcdn.com/image/fetch/$s_!3YGZ!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91f3f513-653a-4d16-94aa-81598f58130b_1150x796.gif 1272w, https://substackcdn.com/image/fetch/$s_!3YGZ!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91f3f513-653a-4d16-94aa-81598f58130b_1150x796.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><h2><strong>Usage</strong></h2><p>If you&#8217;re using <a href="https://cocoapods.org/">Cocoapods</a> be sure to add the following line to the top of your Swift files prior to using <a href="https://github.com/allgamesallfree/ScreenType/">ScreenType</a>:</p><p><code>import ScreenType</code></p><p>The first and most obvious usage is a direct comparison of <code>UIScreen.current</code> and a specific model:</p><p>This can be used anywhere in your app you&#8217;d like to do something only on a specific device.</p><p>You can also use a simple OR operator to do things for two or more types of devices:</p><p>If you need to do specific things for all devices above or below a certain size, you can compare the current <code>ScreenType</code> with another using less than and greater than:</p><h2><strong>What about Objective-C?</strong></h2><p>Objective-C natively maps over Swift <code>Int</code> enums so long as you have a <a href="https://www.hackingwithswift.com/example-code/language/how-to-create-an-objective-c-bridging-header-to-use-code-in-swift">bridging header</a>. That means the <code>ScreenType</code> <code>enum</code> can be used in Objective-C just as easily as in Swift.</p><p>If you&#8217;re using <a href="https://cocoapods.org/">Cocoapods</a> don&#8217;t forget to add <code>@import ScreenType;</code> to your file as well.</p><p>Once thats all set checking the current device in Objective-C is very simple:</p><p>You can also do comparisons against the raw <code>Int</code> value just like in Swift</p><p>There are many other ways you can use this enum to do comparisons between various devices. You can download a full sample app, get installation instructions and more on the <a href="https://github.com/allgamesallfree/ScreenType">ScreenType Github page</a>.</p><p><strong>If <a href="https://github.com/allgamesallfree/ScreenType">ScreenType</a> help&#8217;s you then a &#11088;&#65039; on Github would be greatly appreciated! Also, if you liked this story I would love if you&#8217;d click the &#128079; button below so more people can find out about it.</strong></p>]]></content:encoded></item></channel></rss>