If you’ve been working with SwiftUI, you’ve likely noticed that your views start pretty simple but then balloon into large, unmaintainable monoliths that are hard to preview and test. While there are several techniques to keep SwiftUI views modular and reusable, some problems are architectural in nature and can only be addressed by following proven ... Read more| Matteo Manferdini
As you create increasingly complex SwiftUI views, you may feel your code is turning into a tangled mess of nested stacks, layout view modifiers, and conditionals. In this article, we’ll explore how to leverage SwiftUI’s full toolkit—beyond just stacks—to build configurable views. You’ll learn to use built-in specialized views, view styles, and view builders for ... Read more| Matteo Manferdini
With the JSONSerialization class you can parse JSON into dictionaries, arrays, and other standard Swift types, without requiring Codable types| Matteo Manferdini
Many developers find unit testing confusing. In this essential guide I show the simple concepts that will make unit testing more approachable.| Matteo Manferdini
On the Internet, you can find plenty of SwiftUI tutorials that dive straight into building user interfaces without much consideration for underlying architectural principles. While these examples can get you started, they often lead to a common pitfall: massive SwiftUI views, i.e., views that are hundreds or even thousands of lines long, brimming with disparate ... Read more| Matteo Manferdini
explore how MVVM fits into SwiftUI, how to leverage its advantages, and how it compares to Clean Swift and the Composable Architecture.| Matteo Manferdini
In this guide, I will show you the strategies to select the correct SwiftUI data flow mechanism and the relative property wrappers.| Matteo Manferdini
Uncategorized | Matteo Manferdini
Downloading files in Swift can be pretty straightforward. However, SwiftUI apps must track multiple files, complicating their architecture.| Matteo Manferdini
When you need to download or upload data in iOS apps, use the `URLSession` class to group, pause, resume and cancel network transfers.| Matteo Manferdini
A comprehensive guide to making REST API calls in swift with the proper networking layer architecture for iOS apps in SwiftUI.| Matteo Manferdini
AsyncStream allows you to easily create asynchronous sequences and quickly adapt old APIs to Swift concurrency.| Matteo Manferdini
`AsyncImage` is a convenient SwiftUI view that loads remote images using a URL. It's especially useful in apps that interact with REST APIs.| Matteo Manferdini
Parsing JSON Data is a fundamental in modern SwiftUI apps. This comprehensive guide covers all the aspects of the Codable protocols in Swift.| Matteo Manferdini
Dynamic JSON can be parsed in Swift with Codable with types that conform to the same protocol by reading the type information from an object.| Matteo Manferdini
JSON object with dynamic keys can be decoded using the Decodable protocol by implementing structures that conform to the CodingKey protocol.| Matteo Manferdini
Nested JSON can be decoded in Swift using Decodable and JSONDecoder. To flatten it, use keyed and unkeyed containers.| Matteo Manferdini
Coding keys can be used to rename JSON fields, control the decoding of properties, add extra logic, and flatten nested objects.| Matteo Manferdini
Converting JSON data into a formatted string helps build decodable Swift types and is useful when debugging and testing an app’s code.| Matteo Manferdini