<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Swift on dev.endevour</title><link>https://devendevour.iankulin.com/tags/swift/</link><description>Recent content in Swift on dev.endevour</description><generator>Hugo</generator><language>en-AU</language><lastBuildDate>Tue, 25 Oct 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://devendevour.iankulin.com/tags/swift/index.xml" rel="self" type="application/rss+xml"/><item><title>Updating stored JSON due to a struct change</title><link>https://devendevour.iankulin.com/updating-stored-json-due-to-a-struct-change/</link><pubDate>Tue, 25 Oct 2022 00:00:00 +0000</pubDate><guid>https://devendevour.iankulin.com/updating-stored-json-due-to-a-struct-change/</guid><description>&lt;p&gt;&lt;img src="https://devendevour.iankulin.com/images/jason-modern-art.jpg" alt="Jason Modern Art - Stable Diffusion" class="img-responsive"&gt; &lt;/p&gt;
&lt;p&gt;I mentioned yesterday &amp;ldquo;&lt;em&gt;I could use a renamed old version of my struct to load the existing data, and convert it across to the new model.&lt;/em&gt;&amp;rdquo;. Since I&amp;rsquo;ve been testing the app on my phone, and using plausible data, it was going to be painful enough to lose it that I thought I should go through those steps.&lt;/p&gt;
&lt;p&gt;First, I make a copy of the old struct, and renamed it with the app version number that used it. No need to bring all the computed properties into this struct, just the bits that get encoded into the JSON.&lt;/p&gt;</description></item><item><title>JSON encode/decode</title><link>https://devendevour.iankulin.com/json-encode-decode/</link><pubDate>Mon, 24 Oct 2022 00:00:00 +0000</pubDate><guid>https://devendevour.iankulin.com/json-encode-decode/</guid><description>&lt;p&gt;&lt;img src="https://devendevour.iankulin.com/images/img_3110.png" alt="Screenshop of Habits app" class="img-responsive"&gt; &lt;/p&gt;
&lt;p&gt;As usual, I&amp;rsquo;m spending way more time on the apps written from scratch in the &lt;a href="https://www.hackingwithswift.com/guide/ios-swiftui/4/3/challenge" target="_blank" rel="noopener"&gt;100Days series&lt;/a&gt; . The Habit tracking app I&amp;rsquo;m working on has been good practice, especially of the architecture of the simple &lt;a href="https://devendevour.iankulin.com/list-apps/"&gt;list based app&lt;/a&gt; .&lt;/p&gt;
&lt;p&gt;My version has a couple of refinements I quite like. I&amp;rsquo;m using a checkmark in a rectangle as the button to mark that activity as done, and I&amp;rsquo;ve added a nice fade to the checkmark as time goes on to represent the percentage of time from when it is done until it becomes due again.&lt;/p&gt;</description></item></channel></rss>