<?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 code.kiwi.com</title><link>https://code.kiwi.com/tag/swift/</link><description>Recent content in Swift on code.kiwi.com</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 15 Sep 2025 11:40:41 +0000</lastBuildDate><atom:link href="https://code.kiwi.com/tag/swift/index.xml" rel="self" type="application/rss+xml"/><item><title>Feature configuration with Swift macros</title><link>https://code.kiwi.com/articles/feature-configuration-with-swift-macros/</link><pubDate>Mon, 15 Sep 2025 11:24:59 +0000</pubDate><guid>https://code.kiwi.com/articles/feature-configuration-with-swift-macros/</guid><description>&lt;p&gt;This article describes how we made the iOS app feature configuration system more ergonomic by using Swift’s macros. We take a framework with repetitive, hard-to-understand declarations and manual mocking and eliminate all of these weaknesses.&lt;/p&gt;</description></item><item><title>Swift 5.10 Concurrency Survival Guide</title><link>https://code.kiwi.com/articles/swift-5-10-concurrency-survival-guide/</link><pubDate>Wed, 27 Mar 2024 12:54:34 +0000</pubDate><guid>https://code.kiwi.com/articles/swift-5-10-concurrency-survival-guide/</guid><description>&lt;p&gt;This pattern was broken a few years ago when new versions of Swift started coming out in point updates. Xcode 15.3 includes Swift 5.10. Reading through the &lt;a href="https://developer.apple.com/documentation/xcode-release-notes/xcode-15_3-release-notes"&gt;release notes&lt;/a&gt;, one can find a few mentions of concurrency, such as:&lt;/p&gt;</description></item><item><title>Generating SwiftUI snapshot tests with Swift macros</title><link>https://code.kiwi.com/articles/generating-swiftui-snapshot-tests-with-swift-macros/</link><pubDate>Thu, 15 Feb 2024 11:38:09 +0000</pubDate><guid>https://code.kiwi.com/articles/generating-swiftui-snapshot-tests-with-swift-macros/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Note: Xcode currently does not offer native support for snapshot testing. This can be remedied by using third party library, such as &lt;a href="https://github.com/pointfreeco/swift-snapshot-testing"&gt;swift-snapshot-testing&lt;/a&gt;. This library is being used in following code examples.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="problem"&gt;&lt;strong&gt;Problem&lt;/strong&gt;&lt;/h2&gt;&lt;p&gt;SwiftUI preview and snapshot test code live in different targets and often in different packages, especially when dealing with modular architecture.&lt;/p&gt;</description></item><item><title>Guide to advanced UI tests on iOS</title><link>https://code.kiwi.com/articles/guide-to-advanced-ui-tests-on-ios/</link><pubDate>Wed, 15 May 2019 21:32:00 +0000</pubDate><guid>https://code.kiwi.com/articles/guide-to-advanced-ui-tests-on-ios/</guid><description>&lt;p&gt;&lt;img src="https://code.kiwi.com/images/media/cb79cbdf4c69792d966e8e96fc762537af1121cc3261d9bdb6e121cfd9eafe09.webp" alt=""&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://nsscreencast.com/episodes/328-introduction-to-xctest"&gt;&lt;em&gt;Image source&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Let’s talk about tests for iOS today — especially about writing advanced UI tests using the XCTest framework.&lt;/p&gt;
&lt;p&gt;Before we start, I’d like you to know I will skip all the preparations — such as creating a new test target and adding pods to test target since it’s something you should already know before reading this article. Guide to these settings can be found eg &lt;a href="https://www.raywenderlich.com/709-ios-unit-testing-and-ui-testing-tutorial"&gt;here&lt;/a&gt;. Also, as for the languages, we will be using mainly Swift and a bit of Objective-C.&lt;/p&gt;</description></item></channel></rss>