Swift

421 readers
1 users here now

This group focus on the content related to the development of Apple Eco-system software. So feel free to share and talk about, for example;

founded 2 years ago
MODERATORS
1
2
 
 

Fatbobman’s Swift Weekly #087 is out!

Swift: New Design, New Case Study, New Experience

  • 🌟 Notepad.exe: A Lightweight Swift Code Editor
  • 🌠 WWDC 2025 Wish List Roundup
  • 🎵 DataScout for SwiftData

and more...

3
4
 
 

Xcode Playgrounds has strayed from its original purpose, and VSCode can be too complex for beginners. So, how can we set up a simple Swift learning environment? Notepad.exe might just be the solution.

5
 
 

cross-posted from: https://programming.dev/post/31627972

The internet keeps telling me that they go in the model, but some developers tell me that it goes in the view model

Model (Data / Networking / Algorithms) objects represent special knowledge and expertise. They hold an application’s data and define the logic that manipulates that data.
https://developer.apple.com/forums/thread/699003

Therefore, the model can be thought of as representing the app's domain model, which usually includes a data model along with business and validation logic.
https://learn.microsoft.com/en-us/dotnet/architecture/maui/mvvm

Model: Contains the data or the business logic. Any changes in data are communicated to the ViewModel.
https://medium.com/@dilipp817/understanding-mvvm-architecture-a-beginners-guide-to-model-view-viewmodel-8fb05c285710

The Model's purpose is to represent (or model) your business domain. Therefore, business logic by definition goes in the Model, not the ViewModel.https://developer.apple.com/forums/thread/699003
https://stackoverflow.com/questions/37671866/should-i-implement-business-logic-on-a-model-or-a-viewmodel

Even though the vast majority of business logic is present in the data layer, the UI layer can also contain business logic. This can be the case when combining data from multiple repositories to create the screen UI state, or when a particular type of data doesn't require a data layer.\

ViewModel is the right place to handle business logic in the UI layer. The ViewModel is also in charge of handling events and delegating them to other layers of the hierarchy when business logic needs to be applied to modify application data.
https://developer.android.com/topic/libraries/architecture/viewmodel

6
 
 

Fatbobman’s Swift Weekly #086 is out! Arc, Dia, TCA and SwiftUI

  • ✨ Swift 6 Refactoring in a Camera App
  • 🌌 Making Your iOS App More Accessible with Dynamic Type
  • 🚀 SkyLightWindow
  • 🔒 Forming an Opinion on SwiftUI Forms

... and more

7
 
 

Have You Registered for WWDC 2025 Group Labs Yet?

  • ✨ Experience the Charm of Swift
  • 🌌 Apple Developer Relations
  • 🤚 Creating Xcode Source Editor Extensions
  • 📊 Mesh Gradients in SwiftUI
  • and more...
8
 
 

Use Swift’s generics, KeyPath, protocol extensions, and ResultBuilder to build a type-safe DataFrame export tool with TabularData. Dive into column mapping, conditional logic, and clean DSL syntax for maximum flexibility

9
 
 

Fatbobman’s Swift Weekly #084 is out!

Awaiting WWDC 2025 with Serenity

  • ✨ SwiftUI’s .ignoredByLayout()
  • 🌌 Picker With Optional Selection
  • 🤚 Don't Save SQLite in App Group Container
  • 📊 Default isolation with Swift 6.2

and more...

10
 
 

Publication croisée depuis https://programming.dev/post/30462189

11
 
 

Among SwiftUI’s many APIs, .ignoredByLayout() is something of an “understated member.” Information is scarce, usage scenarios are uncommon, and its very name tends to raise questions. It seems to suggest some kind of “ignoring” of the layout—but how does that differ from modifiers like offset or scaleEffect, which by default don’t affect their parent’s layout? When does ignoredByLayout actually come into play, and what exactly does it “ignore” or “hide”? In this article, we’ll lift the veil on this subtle API in SwiftUI’s layout mechanism.

12
 
 

Don't Let Vibe Coding Hinder Your Technical Growth

Fatbobman’s Swift Weekly #083 is out!

  • 📏 A Complete Guide to Swift Measurement
  • 🔒 SwiftUI View Model Ownership
  • 🍫 Cocoa Basics
  • 🖥️ xtool - Cross-platform alternative to Xcode

and more...

13
 
 

In everyday life we constantly convert values between different units of measurement. For developers this seems easy—write a few formulas, sprinkle in a couple of switch statements and you’re done. But the moment you try to support dozens of units, seamless internationalisation, formatting, precision and rounding, the workload sky-rockets and the drudgery can make you question your life choices. The good news: starting with iOS 10 Apple added a comprehensive Measurement API to Foundation, taking all that “donkey work” off our hands. This article walks you through its usage and best practices.

14
 
 

Apple Pays the Price for Its Arrogance

Fatbobman’s Swift Weekly #082 is out!

  • 🍏 Using equatable() in SwiftUI
  • 🆕 What's New in Swift 6.1
  • 🔒 Mutex in Swift
  • 🎨 Convert VS Code Themes to Xcode

…and more

15
 
 

NavigationLink is a component SwiftUI developers love. By ingeniously combining the behavior of Button with navigation logic, it dramatically simplifies code. Unfortunately, in certain scenarios, using it the wrong way can create serious performance issues and make your app sluggish. This article analyzes the cause of the problem and offers a practical—albeit slightly mysterious—solution: adding the equatable() modifier to optimize performance.

16
 
 

The Chrome Paradox: Could DOJ’s Antitrust Remedy Create OpenAI’s Next Monopoly?

Fatbobman’s Swift Weekly #081 is out!

🔧 make NSImage sendable 🖼️ custom about window for a Mac 🌀 fully native cross-platform Swift apps …and more

17
 
 

Swift’s powerful type system empowers us to create semantically explicit and safe data models. Yet when we move to SwiftData or Core Data, the constraints of their underlying storage mechanisms often force us to compromise on type expressiveness. Those concessions blur our domain models’ intent and plant hidden seeds of instability.

This article explores how, within the restrictions of persistence layers, we can leverage ingenious type wrappers and conversions to build data models that are simultaneously Type-safe, semantically clear, and highly efficient.

18
 
 

Shorter Validity, Longer Shelf Life | Fatbobman's Swift Weekly #80

  • My Hopes for Xcode
  • SwiftUI Colors
  • Zooming Slider
  • Thinking of WWDC
  • Alerts in iOS
  • Swift Reduce
  • XcodeBuild MCP
  • Swift Regex
19
 
 

Can Xcode still capture developers’ enthusiasm? What changes does it need to stay competitive and relevant? In this article, I will outline several key improvements I hope to see in Xcode.

20
 
 

🚨 Microsoft tightens plugin rules ☁️ Google goes all-in on cloud-native AI 🤔 What’s next for Xcode?

Fatbobman’s Swift Weekly #079 is out!

🧱 Build WASM apps in Swift 🔀 Structured Concurrency (EGG rule) 🎯 WWDC25 wishes …and more

21
 
 

Swift 6.1 unleashes official WebAssembly builds through SwiftWasm—no patches required. Dive into this article to discover how to craft WebAssembly apps with Swift and unlock the boundless potential of cross-platform development.

22
 
 

Do Not Market Driver-Assistance as Autonomous Driving | Fatbobman's Swift Weekly #078

  • Environment dismiss
  • Swift 6.1
  • Cross Compiling Swift
  • Modern URL Construction
  • Inspector
  • MKMapView to Image
  • MCP-Supported AI Frameworks
  • State Management
23
 
 

In SwiftUI, dismiss is popular for its flexibility, but overusing it can introduce hidden risks, testing challenges, and stability issues. Opt for state-driven methods like Binding or custom environments for safer, more maintainable UI logic.

24
25
 
 

The Rise of MCP and Apple's AI Framework Vision | Fatbobman's Swift Weekly #077

  • SwiftUI Environment
  • TCA
  • CustomTestStringConvertible
  • Flexible, Styled Component
  • TabView
  • ModelActor
  • Avoid Xcode Projects Merge Conflicts
  • Swiftly 1.0
view more: next ›