From c9b812cd7ea7d905465143ab226dff3d255ee4ae Mon Sep 17 00:00:00 2001 From: Laurent Date: Mon, 9 Sep 2024 15:45:28 +0200 Subject: [PATCH] Change Guard init location --- PadelClub/AppDelegate.swift | 3 +++ PadelClub/Data/DataStore.swift | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/PadelClub/AppDelegate.swift b/PadelClub/AppDelegate.swift index 14c46c1..e3d9e73 100644 --- a/PadelClub/AppDelegate.swift +++ b/PadelClub/AppDelegate.swift @@ -14,6 +14,9 @@ class AppDelegate : NSObject, UIApplicationDelegate, UNUserNotificationCenterDel func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions:[UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. + + _ = Guard.main // init guard + UIApplication.shared.registerForRemoteNotifications() UNUserNotificationCenter.current().delegate = self diff --git a/PadelClub/Data/DataStore.swift b/PadelClub/Data/DataStore.swift index 2a05d74..d9d04ac 100644 --- a/PadelClub/Data/DataStore.swift +++ b/PadelClub/Data/DataStore.swift @@ -67,9 +67,7 @@ class DataStore: ObservableObject { StoreCenter.main.logsFailedAPICalls() var synchronized: Bool = true - - _ = Guard.main // init - + #if DEBUG if let sync = PListReader.readBool(plist: "local", key: "synchronized") { synchronized = sync