<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SwiftUI on code.kiwi.com</title><link>https://code.kiwi.com/tag/swiftui/</link><description>Recent content in SwiftUI on code.kiwi.com</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 15 May 2024 12:15:25 +0000</lastBuildDate><atom:link href="https://code.kiwi.com/tag/swiftui/index.xml" rel="self" type="application/rss+xml"/><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></channel></rss>