Post

Replies

Boosts

Views

Activity

Reply to error: the replacement path doesn't exist:
I received the following message from Apple Feedback Assistant. Thank you for filing the feedback report. We have deployed the fix. Please verify this issue with iOS 18.1 Beta 6 and update your bug report with your results by logging into https://feedbackassistant.apple.com/ or by using the Feedback Assistant app. iOS 18.1 Beta 6 (Build: 22B5069a) https://developer.apple.com/download/ Posted Date: October 7, 2024 I don't have iOS 18.1 Beta 6 on any of my devices. Is there anyone who does and can confirm the fix?
Oct ’24
Reply to SwiftData @Model does not conform to the 'Sendable' protocol; thi
@FPST I had to write a method that returned the models from a sorted fetch and then get their PersistentIdentifiers. public func fetchSort<T: PersistentModel>(_ descriptor: FetchDescriptor<T>) throws -> [PersistentIdentifier] { var result = [PersistentIdentifier]() var models = [T]() models = try self.modelContext.fetch(descriptor) for model in models { let pID = model.persistentModelID result.append(pID) } return result }
Aug ’24
Reply to Swift 6, SwiftData modelContext.save() Crashes, Does not AutoSave
I've discovered where the crash is occurring. I have an @objc function called updateView() that is fired when the view controller detects NSPersistenStoreRemoteChange. As soon as I save an object in another view, the update fires and the app crashes. NotificationCenter.default.addObserver(self, selector: #selector(updateView(_ :)), name: .NSPersistentStoreRemoteChange, object: nil) The crash does not occur using Swift 5.
Aug ’24