diff --git a/HelperService/main.swift b/HelperService/main.swift index f7b01b2..937bfea 100644 --- a/HelperService/main.swift +++ b/HelperService/main.swift @@ -15,6 +15,9 @@ setupOptions.tempPath = WorkingDirectoryManager.helperTempDirectoryPath setupOptions.crashReportSource = "RootHelper" var setupError: NSError? LibboxSetup(setupOptions, &setupError) +if let setupError { + NSLog("setup service error: \(setupError.localizedDescription)") +} let service = RootHelperService() service.pendingCrashLogs = pendingCrashLogs diff --git a/MacLibrary/ApplicationDelegate.swift b/MacLibrary/ApplicationDelegate.swift index b1ce382..b2de6bc 100644 --- a/MacLibrary/ApplicationDelegate.swift +++ b/MacLibrary/ApplicationDelegate.swift @@ -16,7 +16,14 @@ open class ApplicationDelegate: NSObject, NSApplicationDelegate, UNUserNotificat options.crashReportSource = "Application" var error: NSError? LibboxSetup(options, &error) - LibboxSetLocale(Locale.current.identifier) + if let error { + NSLog("setup service error: \(error.localizedDescription)") + } + var localeError: NSError? + LibboxSetLocale(Locale.current.identifier, &localeError) + if let localeError { + NSLog("failed to set locale: \(localeError)") + } let notificationCenter = UNUserNotificationCenter.current() notificationCenter.setNotificationCategories([ UNNotificationCategory( diff --git a/SFI/ApplicationDelegate.swift b/SFI/ApplicationDelegate.swift index 04b5f4f..64771e6 100644 --- a/SFI/ApplicationDelegate.swift +++ b/SFI/ApplicationDelegate.swift @@ -19,9 +19,16 @@ class ApplicationDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCe options.workingPath = FilePath.workingDirectory.relativePath options.tempPath = FilePath.cacheDirectory.relativePath options.crashReportSource = "Application" - var error: NSError? - LibboxSetup(options, &error) - LibboxSetLocale(Locale.current.identifier) + var setupError: NSError? + LibboxSetup(options, &setupError) + if let setupError { + NSLog("setup service error: \(setupError.localizedDescription)") + } + var localeError: NSError? + LibboxSetLocale(Locale.current.identifier, &localeError) + if let localeError { + NSLog("failed to set locale: \(localeError)") + } let notificationCenter = UNUserNotificationCenter.current() notificationCenter.setNotificationCategories([ UNNotificationCategory( diff --git a/SFT/ApplicationDelegate.swift b/SFT/ApplicationDelegate.swift index 7a0141c..7b10219 100644 --- a/SFT/ApplicationDelegate.swift +++ b/SFT/ApplicationDelegate.swift @@ -32,7 +32,14 @@ class ApplicationDelegate: NSObject, UIApplicationDelegate { options.crashReportSource = "Application" var error: NSError? LibboxSetup(options, &error) - LibboxSetLocale(Locale.current.identifier) + if let error { + NSLog("setup service error: \(error.localizedDescription)") + } + var localeError: NSError? + LibboxSetLocale(Locale.current.identifier, &localeError) + if let localeError { + NSLog("failed to set locale: \(localeError)") + } setup() return true }