Swift

431 readers
3 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
 
 

While Swift’s strict concurrency checking has good intentions, it significantly increases the burden on developers in many single-threaded scenarios. Developers are forced to add unnecessary Sendable, @MainActor, and other declarations to their code just to satisfy the compiler’s requirements. Swift 6.2’s new Default Actor Isolation feature will greatly improve this situation and reduce unnecessary boilerplate code. This article will introduce the Default Actor Isolation feature and point out some situations to be aware of when using it.

2
 
 

Blender is Developing an iPad Version

  • 🚦 Core Data Migration Incident Analysis
  • 🌟 Uncertain⟨T⟩
  • 🛠️ Xcode Project Renamer
  • 💡 iOS Backend Selection Cheat Sheet
  • ❓ How to Combine SwiftUI Views

and more...

3
 
 

Compared to some open-source frameworks, Core Data and SwiftData, despite having Apple’s official endorsement, often leave developers helpless when exceptions occur due to their “black box” nature, making it difficult to quickly locate problems and find effective solutions. This article documents an app startup timeout incident caused by Core Data model migration, shares the solution, and deeply analyzes the underlying causes.

4
 
 

Fatbobman’s Swift Weekly #094 is out!

F1: A Great Movie, An Even Greater Business

  • ✨ Icon Composer: Tackling Challenges
  • ⏳ SwiftUI 2025: What’s Fixed, What’s Not
  • 🪟 Windowing on iPadOS
  • 🔎 Apple Docs MCP

and more...

5
 
 

A Dimmer Liquid Glass and the Disappearance of Apple Intelligence

  • 🚀 How to Detect Text Truncation in SwiftUI
  • 📲 Everything You Should Know About Spacer
  • 🔍 Shaft - Swift-based Cross-platform UI Framework

and more...

6
 
 

Text is heavily used in SwiftUI. Compared to its counterparts in UIKit/AppKit, Text requires no configuration and works out of the box, but this also means developers lose more control over it. In this article, I will demonstrate through a real-world case study how to accomplish seemingly “impossible” tasks with SwiftUI’s approach: finding the first view among a given set where text is not truncated, and using it as the required size.

7
 
 

Fatbobman’s Swift Weekly #092 is out! High Temperatures and Strange Atmospheric Phenomena

  • 🌟 My Month with Claude Code
  • ⏰ Schedule a Countdown Timer with AlarmKit
  • 📱 Using the Swift Android SDK
  • 🔎 Improving SwiftUI Performance

and more...

8
 
 

Swift’s Multi-Platform Strategy Requires Collective Effort

  • ⭐ NotificationCenter.Message
  • 🚀 Xcode’s Coding Intelligence Prompt
  • 🔐 Memory Efficiency in iOS

and more...

9
10
 
 

NotificationCenter has long been a staple of iOS development, offering developers a flexible broadcast–subscribe mechanism. However, as Swift’s concurrency model has advanced, the traditional approach—using string-based identifiers and a userInfo dictionary—has revealed several pitfalls: thread-safety hazards, silent typos, and unsafe type casts. These issues often only surface at runtime.

To eliminate these pain points, Swift 6.2 introduces a brand-new, concurrency-safe notification protocols in Foundation: NotificationCenter.MainActorMessage and NotificationCenter.AsyncMessage. Leveraging Swift’s type system and concurrency isolation, it validates both posting and observing at compile time, completely eradicating common problems like “wrong thread” or “payload type mismatch.”

11
 
 

Fatbobman’s Swift Weekly #090 is out! You Only Realize Its Value Once It’s Gone

  • 🔍 layoutPriority in SwiftUI ZStack
  • 🚀 Exploring the Limits of On-Device AI
  • 📈 Exploring a New Visual Language: Liquid Glass
  • 🧩 What's New in SwiftUI for iOS 26

and more...

12
 
 

In SwiftUI’s layout system, the .layoutPriority modifier might seem inconspicuous at first glance, yet it can decisively influence a view’s size allocation when it matters most. Most developers know its “magic”—in a VStack or HStack, a higher priority view will fight for more space when things get cramped. But did you realize that .layoutPriority can work wonders in a ZStack too? Its behavior there is entirely different from VStack and HStack. In this article, we’ll dive deep into this little-known feature and show you how to harness layout priority inside a ZStack.

13
 
 

Fatbobman’s Swift Weekly #089 is out! WWDC 2025: A Return to Pragmatism

  • ✨ A (Re-)Introduction to ExtensionKit
  • 🌌 SwiftData vs SQL Query Builder
  • 🌊 llm .codes : Make Apple Docs AI-Readable
  • 🎶 Dragula : Drag-and-Drop Solution for SwiftUI

and more...

14
 
 

WWDC 2025 introduced a host of eye-catching new features and APIs. In this special issue, we’ve handpicked high-value analysis articles, practical tools, and key takeaways from the developer community to help you quickly master the essentials of these new capabilities. Content will continue to be updated through the end of the week.

15
 
 

WWDC 2025 arrived right on schedule. Apple released all session videos at once, allowing developers to dive into the new features and APIs they care about without delay. After skimming through them over the past two days, my initial takeaway for this year’s conference is: as expected, yet unexpected.

16
17
 
 

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...

18
 
 

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

19
20
 
 

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.

21
 
 

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

22
 
 

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...
23
 
 

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

24
 
 

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...

25
 
 

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

view more: next ›