feat: add macos runtime

This commit is contained in:
dscyrescotti
2024-07-06 14:20:31 +07:00
parent 8d33b94789
commit 15e96136f1
41 changed files with 367 additions and 114 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ struct MemolaApp: App {
WindowGroup {
DashboardView()
.persistence(\.viewContext)
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willTerminateNotification)) { _ in
.onReceive(NotificationCenter.default.publisher(for: Platform.Application.willTerminateNotification)) { _ in
withPersistenceSync(\.viewContext) { context in
try context.saveIfNeeded()
}