Swift

433 readers
2 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
51
 
 

The Observation framework has brought native property-level observation to Swift, effectively preventing unnecessary view updates in SwiftUI triggered by unrelated property changes, thereby enhancing application performance. However, since @State does not offer a lazy initialization constructor like @StateObject, it may lead to performance degradation or even logical issues due to the premature construction of instances in certain scenarios. This article explores how to implement a lazy initialization solution for Observable instances using @State.

52
 
 

Experiencing the Passion of Apple Developers at the Carnival | Fatbobman's Swift Weekly #073

  • Animatable Protocol
  • New Stuff with 6.1
  • Task.sleep vs. Task.yield
  • View Models with Enums
  • Music Recognition with ShazamKit
  • OpenSwiftUI & Harmony
53
54
55
 
 

The SwiftUI Animatable protocol allows for precise animation control, resolving issues like missing or inconsistent animations. Learn how animatableData can improve animation accuracy and stability in complex UI scenarios.

56
 
 

Beyond X: The Swift Community Embraces Mastodon and Bluesky | Fatbobman's Swift Weekly #072

  • From Host to Serverless
  • Swift Server Case
  • Git Commits Tips
  • async let vs Task Group
  • Test in SwiftUI
  • Custom SF Symbol
  • Concurrency and Legacy Code
57
 
 

Beyond X: The Swift Community Embraces Mastodon and Bluesky | Fatbobman's Swift Weekly #072

  • From Host to Serverless
  • Swift Server Case
  • Git Commits Tips
  • async let vs Task Group
  • Test in SwiftUI
  • Custom SF Symbol
  • Concurrency and Legacy Code
58
59
 
 

Building Android Apps with Swift | Fatbobman's Swift Weekly #071

  • Implementing Custom Paging
  • Exploring MLX Swift
  • Deep Links in SwiftUI
  • Using TranslateKit for Localization
  • xcconfig in Xcode
  • Swift Interoperability with C
60
61
 
 

Feedback and Communication | Fatbobman's Swift Weekly #070

  • Apple Vision Pro 1 Year Later
  • ControlGroup
  • Sound Engineering on iOS
  • Drawing Maps with Swift Charts
  • TaskGroups
  • Parameterized Tests
62
 
 

Fireworks and Drones | Fatbobman's Swift Weekly #069

  • Swift Build
  • Swift Concurrency Glossary
  • Multiplatform Development
  • Send Email in iOS
  • PhotosKit Storage Model
  • macOS System Services
63
64
 
 

DeepSeek: Achieving More with Less | Fatbobman's Swift Weekly #068

  • Key Pressed Menu
  • Xcode & SPM Issues
  • SwiftUI Action Menu
  • Reduce Motion Tips
  • Observing Observable Outside of View
  • Tuist Registry Launch
65
 
 

Weekly Newsletter Progress and Blog Updates | Fatbobman's Swift Weekly #067

  • Advanced Navigation
  • Git Revision in App
  • Text Animation Issue
  • Buildable Folders
  • Backend with Vapor
  • SwiftUI Lists
  • Quick Tips of SwiftUI
66
 
 

Integrating AI into the Daily Workflow | Fatbobman's Swift Weekly #066

  • Preview Under the Hood
  • Adopting Swift 6
  • Enums Codable
  • Typed Throws
  • Debounced Search
  • SwiftData CRUD
  • Sync with CKSyncEngine
  • Swift Runtime
67
68
 
 

Fatbobman's Swift Weekly #065 | Perspective Shift: Viewing the Developer's Dual Identity Through the Airport Debate

  • _VariadicView
  • Copilot and SwiftUI
  • Keep Menu Bar Alive
  • retroactive Keyword
  • Reentrancy and Logical Race
  • MongoDB in Swift
69
 
 

Fatbobman's Swift Weekly #64 | Happy New Year 2025

  • State Issue in Swift 6
  • TabView Advancements
  • Genmoji in Non-Rich Text
  • Dissolve Effect
  • Write Swift Like Apple
  • Widgets, AppIntents, Siri Shortcuts and WatchKit
70
 
 

In Xcode 16, to improve SwiftUI’s performance under Swift 6 mode, Apple made several adjustments to the SwiftUI framework’s APIs to meet stricter concurrency checks. The most notable change is the comprehensive annotation of the View protocol with @MainActor. While these optimizations generally enhance the developer experience in Swift 6 mode, they also introduce some seemingly anomalous compile-time errors in specific scenarios. This article delves into why certain view modifiers cannot directly use @State properties and provides corresponding solutions.

71
 
 

Fatbobman's Swift Weekly #063 | Breakthroughs in Xenotransplantation of Kidneys

  • onAppear Issues
  • Validation Patterns in SwiftUI
  • SwiftUI Data Flow
  • Xcode Library Customization
  • Noncopyable
  • Sending vs Sendable
  • LinkText
72
 
 

Introduction

Integrating Firebase Authentication into your SwiftUI app offers a secure and efficient way to manage user sign-ins.

With Firebase, you can authenticate users using various login methods, like Google, Apple, Email, phone number, and many more authentications.

We’ll walk you through setting up Firebase Authentication in a SwiftUI app, focusing on three key authentication providers: Google, Apple, and Phone number login.

We aim to simplify the setup and implementation process to help you build a secure, user-friendly app.

Our Open source project is also available on this GitHub Repository.

Firebase Project Setup

Implementing a secure and scalable phone login feature in your SwiftUI app using Firebase Authentication is within your grasp.

This guide also lays the foundation for integrating Google and Apple login, ensuring your app is ready for real-world scenarios.

Adopting a modular structure and MVVM architecture ensures maintainability and easy future expansions.

Eager to explore more?

To explore the step-by-step instructions, best practices, and details implementations, check out our full guide at Canopas Blog.

Happy coding!

73
 
 

onAppear is an extremely crucial lifecycle method in SwiftUI, used to inject key logic when a view is presented. Since view instances may be created and rebuilt frequently, developers often choose to prepare data and perform initialization operations within these methods. In theory, the timing of these lifecycle method calls should be predictable and consistent. However, in certain specific scenarios, onAppear may be called unexpectedly and unnecessarily. This not only can lead to performance overhead but also may cause uncontrollable changes in the application’s state. This article will uncover this easily overlooked SwiftUI behavior trap and provide temporary countermeasures.

74
3
Fatbobman's Swift Weekly #062 (weekly.fatbobman.com)
submitted 7 months ago* (last edited 7 months ago) by fatbobman@programming.dev to c/swift@programming.dev
 
 

Fatbobman's Swift Weekly #062 | Making Swift Stronger, Keeping It Simple

  • Model Inheritance in Core Data
  • Use of Swift and SwiftUI in iOS 18
  • SF Symbol
  • Mocking Network Connection in Testing
  • Image Playground
  • Swift Macro
  • MLX Swift
75
view more: ‹ prev next ›