Malcolm Hall

  • About
  • Research
  • Consultancy
  • Products
    • AppRecorder
    • Apps Using Location
    • Clipboard Monitor
    • Common Rocks Reference
    • Core Location Info
    • Friendify
    • Grape Stomper
    • HomeMenu
    • iBeacon Scanner
    • Insomnia
    • Navigate from Maps
    • Nickname
    • Plate Smasher
    • Plugged In
    • Readster
    • Resize Image
    • Read★
    • ScreenshotMenu
    • Sleep Display
    • SleepFX
    • Stealth Cam
    • TV Tube Sleep
    • UDID Calculator
    • WiFi Booster
    • WiFi Passwords

April 2024

SwiftUI

Observable does not conform with Equatable (and Hashable)

I noticed a snag when using NavigationLink(value:label:) and .navigationDestination(for:destination:) with the new @Observable vs the old Combine ObservableObject (which “just worked™️”). There are 2 compilation errors: Fortunately it is relatively simple to add Hashable conformance to an @Observable class by implementing a static func == and a func hash that Read more…

By malhal, 1 year23rd April 2024 ago
SwiftUI

@Observable vs ObservableObject in SwiftUI

In SwiftIUI, when requiring the reference semantics of a class and wanting to upgrade from Combine’s ObservableObject and @StateObject to the new @Observable it requires a bit more work to get the life-cycle correct. The reason for this is we have to store the object in @State which is designed Read more…

By malhal, 1 year22nd April 2024 ago
Mac

How to clone an Apple Silicon Mac without Migration Assistant or Time Machine

Today I successfully cloned my M1 MacBook Air to a new M3 MacBook Pro, it took some effort so thought I would share the steps here. Before I begin, the reason I prefer to clone rather than use Migration Assistant is I have many command line tools installed all over Read more…

By malhal, 1 year17th April 2024 ago
SwiftUI

SwiftUI: Sharing AppStorage across the whole app

Sharing @AppStorage without having to pass it into every feature of the app is simply done in the same way it’s done for anything else you want to share: EnvironmentKey. It lets you share a source of truth into a View hierarchy without needing to pass it into every View. Read more…

By malhal, 1 year10th April 2024 ago
Recent Posts
  • Converting from @StateObject to .task
  • @Observable and didSet
  • Dynamically filtering a SwiftData query
  • Interesting glitch with Measurement in SwiftUI
  • How to use withObservationTracking to monitor an @Observable
Recent Comments
  • SwiftUI 2: the way to open view in new window on Open window / scene in SwiftUI 2.0 on macOS
  • Why Does URL Scheme/onOpenURL In SwiftUI Always Open A New Window? - Programming Questions And Solutions Blog on Open window / scene in SwiftUI 2.0 on macOS
  • Ken Carroll on Enabling iOS 9.3 SDK in Xcode 8 for iOS 10
  • Mr WordPress on Welcome to my Developer Blog
Archives
  • February 2025
  • November 2024
  • October 2024
  • July 2024
  • May 2024
  • April 2024
  • March 2024
  • January 2024
  • December 2023
  • October 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • January 2023
  • November 2022
  • June 2022
  • December 2020
  • May 2018
  • October 2017
  • September 2017
  • August 2017
  • January 2017
  • July 2016
  • May 2016
Categories
  • AppIntents
  • CloudKit
  • Concurrency
  • CoreData
  • CoreLocation
  • Mac
  • MapKit
  • NSOperation
  • Objective-C
  • Swift
  • SwiftData
  • SwiftUI
  • UIKit
  • Uncategorised
  • Xcode
Meta
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
  • About
  • AppRecorder
  • Apps Using Location
  • Clipboard Monitor
  • Common Rocks Reference
  • Consultancy
  • Core Location Info
  • Friendify
  • Grape Stomper
  • HomeMenu
  • iBeacon Scanner
  • Insomnia and Insomnia Pro for iPhone
  • Navigate from Maps
  • Nickname
  • Plate Smasher
  • Plugged In
  • Products
  • Projects
  • Read★
  • Readster
  • Research
  • Resize Image
  • Sample Page
  • ScreenshotMenu
  • Sleep Display
  • SleepFX
  • Stealth Cam
  • TV Tube Sleep
  • UDID Calculator
  • WiFi Booster
  • WiFi Passwords
Hestia | Developed by ThemeIsle