Post

Replies

Boosts

Views

Activity

Reply to How to clear locally cached SwiftData database on macOS
Found the path with that code : let urlApp = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).last let url = urlApp!.appendingPathComponent("default.store") if FileManager.default.fileExists(atPath: url.path) { print("swiftdata db at \(url.absoluteString)") } THen once in that folder I did rm -rf default* And the local coach is gone!
Mar ’24
Reply to Load issue on SwiftData model container on macOS and not iOS
Found the reason why. I had a locally cached database that was in conflict with the model (I changed the type of an attribute). I removed the cache as explained here and that fixed the issue
Replies
Boosts
Views
Activity
Mar ’24
Reply to How to clear locally cached SwiftData database on macOS
Found the path with that code : let urlApp = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).last let url = urlApp!.appendingPathComponent("default.store") if FileManager.default.fileExists(atPath: url.path) { print("swiftdata db at \(url.absoluteString)") } THen once in that folder I did rm -rf default* And the local coach is gone!
Replies
Boosts
Views
Activity
Mar ’24