Fix setupError not logged

This commit is contained in:
世界
2026-04-23 08:12:52 +08:00
parent b48f4ad97f
commit 6559720e00
4 changed files with 29 additions and 5 deletions
+10 -3
View File
@@ -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(