<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>The Swift Dev</title><description>I&apos;m Trevor, a Swift developer working mainly in iOS 📱. This blog is where I share my learnings, thoughts &amp; insights. Thanks for reading!</description><link>https://www.theswift.dev/</link><item><title>Shortcut for &quot;.compactMap { $0 }&quot; in Combine (Swift)</title><link>https://www.theswift.dev/posts/shortcut-for-compactmap-in-combine-swift/</link><guid isPermaLink="true">https://www.theswift.dev/posts/shortcut-for-compactmap-in-combine-swift/</guid><description>I have this pet peeve where I don’t like to type out .compactMap { $0 } every time I want to remove nils from a publisher. Today I finally took some time to find a good alternative &amp; I really like how ...</description><pubDate>Mon, 25 Sep 2023 00:00:00 GMT</pubDate></item><item><title>Refactor A Private Callback Based API To Use Async/Await</title><link>https://www.theswift.dev/posts/refactor-a-private-callback-based-api-to-use-async-await/</link><guid isPermaLink="true">https://www.theswift.dev/posts/refactor-a-private-callback-based-api-to-use-async-await/</guid><description>Last time we talked about how to refactor a callback based network call into an async/await based call. In that case, we had access to the underlying networking code &amp; updated the entire chain of method calls to use async/await...</description><pubDate>Thu, 27 Oct 2022 00:00:00 GMT</pubDate></item><item><title>Refactor A Callback Based API To Use Async/Await</title><link>https://www.theswift.dev/posts/refactor-a-callback-based-api-to-use-async-await/</link><guid isPermaLink="true">https://www.theswift.dev/posts/refactor-a-callback-based-api-to-use-async-await/</guid><description>Recently I’ve refactored a few callback based network requests to use Swift’s new Async / Await syntax. Let’s take a look at how we can take a conventional callback based API method and improve its readability and simplicity...</description><pubDate>Thu, 06 Oct 2022 00:00:00 GMT</pubDate></item><item><title>Add an App Download Banner to Your Web Page</title><link>https://www.theswift.dev/posts/add-an-app-download-banner-to-your-web-page/</link><guid isPermaLink="true">https://www.theswift.dev/posts/add-an-app-download-banner-to-your-web-page/</guid><description>Let’s learn how to add a slick app download banner to your website! Apple officially calls this a Smart App Banner, because it changes its wording based on if the user has the app installed. If the app isn’t installed, the...</description><pubDate>Mon, 19 Sep 2022 00:00:00 GMT</pubDate></item><item><title>SwiftUI Divider Colors &amp; Thickness</title><link>https://www.theswift.dev/posts/swiftui-divider-colors-thickness/</link><guid isPermaLink="true">https://www.theswift.dev/posts/swiftui-divider-colors-thickness/</guid><description>Another SwiftUI post coming your way! This time we’ll take a look at Divider and how we can change its color. As nice as it would be to change the divider color with tint or foregroundColor, we can’t do it that way 😭...</description><pubDate>Fri, 09 Sep 2022 00:00:00 GMT</pubDate></item><item><title>SwiftUI Alert With Styled Buttons</title><link>https://www.theswift.dev/posts/swiftui-alert-with-styled-buttons/</link><guid isPermaLink="true">https://www.theswift.dev/posts/swiftui-alert-with-styled-buttons/</guid><description>SwiftUI is the best thing since sliced bread, but I often come across simple problems that take longer than expected to sort out. Take for example an alert where I want to style the buttons. In my specific case it was a confirm...</description><pubDate>Thu, 01 Sep 2022 00:00:00 GMT</pubDate></item><item><title>I made a Swift syntax highlighting app</title><link>https://www.theswift.dev/posts/i-made-a-swift-syntax-highlighting-app/</link><guid isPermaLink="true">https://www.theswift.dev/posts/i-made-a-swift-syntax-highlighting-app/</guid><description>If you’re a Swift blogger like me, you probably have to come up with some easy way to highlight code syntax on the web. After some searching I came across Splash which was created by the relatively famous John Sundell (he uses...</description><pubDate>Thu, 18 Aug 2022 00:00:00 GMT</pubDate></item><item><title>Wait for a text field to have focus during an XCUITest</title><link>https://www.theswift.dev/posts/wait-for-a-text-field-to-have-focus-during-an-xcuitest/</link><guid isPermaLink="true">https://www.theswift.dev/posts/wait-for-a-text-field-to-have-focus-during-an-xcuitest/</guid><description>I was recently working on some XCUITests and attempting to get them working inside a CI/CD pipeline (Bitrise). It turns out that the virtual machines on Bitrise are a bit underpowered, so many things like building a project ...</description><pubDate>Tue, 09 Aug 2022 00:00:00 GMT</pubDate></item><item><title>Easily Keep Build Numbers And Marketing Versions In Sync</title><link>https://www.theswift.dev/posts/easily-keep-build-numbers-and-marketing-versions-in-sync/</link><guid isPermaLink="true">https://www.theswift.dev/posts/easily-keep-build-numbers-and-marketing-versions-in-sync/</guid><description>Let’s take a look at how to change all of your targets’ build numbers and marketing versions in a single place. I was surprised to find that a lot of developers don’t know this simple trick &amp; manually change their build numbers...</description><pubDate>Thu, 04 Aug 2022 00:00:00 GMT</pubDate></item><item><title>Fix the cached launch screen image bug on iOS</title><link>https://www.theswift.dev/posts/fix-the-cached-launch-screen-image-bug-on-ios/</link><guid isPermaLink="true">https://www.theswift.dev/posts/fix-the-cached-launch-screen-image-bug-on-ios/</guid><description>Every once in a while you’ll probably make some changes to your launch screen, and I’ve run into a few headaches while doing it. Most recently I had trouble with an image not updating as expected. Let’s walk through what I did...</description><pubDate>Tue, 19 Jul 2022 00:00:00 GMT</pubDate></item><item><title>My Realistic Physics Contribution to ConfettiSwiftUI</title><link>https://www.theswift.dev/posts/my-realistic-physics-contribution-to-confettiswiftui/</link><guid isPermaLink="true">https://www.theswift.dev/posts/my-realistic-physics-contribution-to-confettiswiftui/</guid><description>I was recently working on my Wordie app &amp; needed some confetti to celebrate a victory when the user guesses the correct word. I built the app completely in SwiftUI so I started searching for a confetti library I could drop in...</description><pubDate>Tue, 26 Apr 2022 00:00:00 GMT</pubDate></item><item><title>Merge Two Lists - Iterative &amp; Recursive Solutions</title><link>https://www.theswift.dev/posts/merge-two-lists-iterative-and-recursive-solutions/</link><guid isPermaLink="true">https://www.theswift.dev/posts/merge-two-lists-iterative-and-recursive-solutions/</guid><description>This is LeetCode problem #21. I liked it so much that I wanted to write a post with an in depth walkthrough of the logic to solve it both iteratively &amp; recursively.Here’s the problem - you’re given two linked lists that are ...</description><pubDate>Thu, 21 Apr 2022 00:00:00 GMT</pubDate></item><item><title>Longest Substring Without Repeating Characters</title><link>https://www.theswift.dev/posts/longest-substring-without-repeating-characters/</link><guid isPermaLink="true">https://www.theswift.dev/posts/longest-substring-without-repeating-characters/</guid><description>This is my first post in a series of algorithm problems. Breaking it down and sharing my solution helps me learn &amp; is an easy way to go back and review how to solve certain type...</description><pubDate>Tue, 12 Apr 2022 00:00:00 GMT</pubDate></item><item><title>Debug Xcode Scheme Pre &amp; Post Actions</title><link>https://www.theswift.dev/posts/debug-xcode-scheme-pre-post-actions/</link><guid isPermaLink="true">https://www.theswift.dev/posts/debug-xcode-scheme-pre-post-actions/</guid><description>Going along with my previous post about auto incrementing build numbers in Xcode, I thought it might be useful to share how I debugged Xcode scheme pre &amp; post actions. Normally these actions don’t show error messages...</description><pubDate>Wed, 30 Mar 2022 00:00:00 GMT</pubDate></item><item><title>Auto Increment Your Build Numbers</title><link>https://www.theswift.dev/posts/auto-increment-your-build-numbers/</link><guid isPermaLink="true">https://www.theswift.dev/posts/auto-increment-your-build-numbers/</guid><description>If you&apos;re like me you probably get tired of manually incrementing your app build number in Xcode. After a few hours of testing I finally nailed down a simple solution that works on Xcode 13.2.1. Let&apos;s dive right in...</description><pubDate>Thu, 03 Mar 2022 00:00:00 GMT</pubDate></item><item><title>Building your first widget - Step 2</title><link>https://www.theswift.dev/posts/building-your-first-widget-step-2/</link><guid isPermaLink="true">https://www.theswift.dev/posts/building-your-first-widget-step-2/</guid><description>In step 1 we created the widget extension target &amp; got it running on the simulator. Now let’s look at the basic parts of a widget. You’ll notice that Apple created a folder with your widget name &amp; made a template file for you...</description><pubDate>Fri, 23 Apr 2021 00:00:00 GMT</pubDate></item><item><title>Building your first widget - Step 1</title><link>https://www.theswift.dev/posts/building-your-first-widget-step-1/</link><guid isPermaLink="true">https://www.theswift.dev/posts/building-your-first-widget-step-1/</guid><description>It was pretty cool when Apple gave us widgets with iOS 14. Finally we could customize our home screens with something more than just app icons! This is a simple walkthrough of how to add a widget to your app &amp; what to put in...</description><pubDate>Fri, 16 Apr 2021 00:00:00 GMT</pubDate></item><item><title>Handle Multiple Async Callbacks with DispatchGroup</title><link>https://www.theswift.dev/posts/handle-multiple-async-callbacks-with-dispatchgroup/</link><guid isPermaLink="true">https://www.theswift.dev/posts/handle-multiple-async-callbacks-with-dispatchgroup/</guid><description>The first time I heard of a DispatchGroup was a few years into my iOS career - my teammate mentioned that he used it in his pull request code. He said this DispatchGroup made it easy to wait for multiple async callbacks...</description><pubDate>Fri, 09 Apr 2021 00:00:00 GMT</pubDate></item></channel></rss>