Post

Replies

Boosts

Views

Activity

Comment on [macOS] CoreSpotlight importer using CSImportExtension failing to index
If it is listed in mdimport -e it can run with mdimport -m -y LOWERCASECONTENTTYPE -u PATHTOAFILE however the attributes aren't actually added to Spotlight's database. And even if the Spotlight extension is enabled in Settings->LoginItems->Spotlight Extensions, Spotlight will never actually run the extension itself. And if in the extension code you attempt to open the file with a try, it throws a permission exception so you wouldn't even be able to compute attributes anyway.
Topic: App & System Services SubTopic: General Tags:
Sep ’25
Comment on SwiftData updates in the background are not merged in the main UI context
By the way on macOS 15.4.1 (24E263) I found @Query does call body when ModelActor saves 🤔 Seems to me @Query watches for the remote store changed notification, then toggles a bool to and performs another SQL query. CoreData: debug: Remote Change Notification - posting for store ContentView: \QueryController<Item>.<computed (Bool)> changed. CoreData: sql: SELECT 0, t0.Z_PK, t0.Z_OPT, t0.ZCOUNTER, t0.ZTIMESTAMP, t0.ZUNIQUEIDENTIFIER FROM ZITEM t0 ORDER BY t0.ZTIMESTAMP DESC, t0.Z_PK
Apr ’25
Comment on @StateObject for view owning "viewModel" to use with @Observable observation framework object
Since SwiftUI already is a view model you would be better off learning State & Binding instead of trying to build a custom layer of MVVM objects on top of it. That will likely cause the same kind of consistency errors that SwiftUI's use of View structs was designed to eliminate. Try breaking your view data up into View structs, put State in a shared common parent, pass down as let for read only or Binding var for read/write. The body will be called in all cases when the data changes.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’24