Fix setupError not logged
This commit is contained in:
@@ -15,6 +15,9 @@ setupOptions.tempPath = WorkingDirectoryManager.helperTempDirectoryPath
|
|||||||
setupOptions.crashReportSource = "RootHelper"
|
setupOptions.crashReportSource = "RootHelper"
|
||||||
var setupError: NSError?
|
var setupError: NSError?
|
||||||
LibboxSetup(setupOptions, &setupError)
|
LibboxSetup(setupOptions, &setupError)
|
||||||
|
if let setupError {
|
||||||
|
NSLog("setup service error: \(setupError.localizedDescription)")
|
||||||
|
}
|
||||||
|
|
||||||
let service = RootHelperService()
|
let service = RootHelperService()
|
||||||
service.pendingCrashLogs = pendingCrashLogs
|
service.pendingCrashLogs = pendingCrashLogs
|
||||||
|
|||||||
@@ -16,7 +16,14 @@ open class ApplicationDelegate: NSObject, NSApplicationDelegate, UNUserNotificat
|
|||||||
options.crashReportSource = "Application"
|
options.crashReportSource = "Application"
|
||||||
var error: NSError?
|
var error: NSError?
|
||||||
LibboxSetup(options, &error)
|
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()
|
let notificationCenter = UNUserNotificationCenter.current()
|
||||||
notificationCenter.setNotificationCategories([
|
notificationCenter.setNotificationCategories([
|
||||||
UNNotificationCategory(
|
UNNotificationCategory(
|
||||||
|
|||||||
@@ -19,9 +19,16 @@ class ApplicationDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCe
|
|||||||
options.workingPath = FilePath.workingDirectory.relativePath
|
options.workingPath = FilePath.workingDirectory.relativePath
|
||||||
options.tempPath = FilePath.cacheDirectory.relativePath
|
options.tempPath = FilePath.cacheDirectory.relativePath
|
||||||
options.crashReportSource = "Application"
|
options.crashReportSource = "Application"
|
||||||
var error: NSError?
|
var setupError: NSError?
|
||||||
LibboxSetup(options, &error)
|
LibboxSetup(options, &setupError)
|
||||||
LibboxSetLocale(Locale.current.identifier)
|
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()
|
let notificationCenter = UNUserNotificationCenter.current()
|
||||||
notificationCenter.setNotificationCategories([
|
notificationCenter.setNotificationCategories([
|
||||||
UNNotificationCategory(
|
UNNotificationCategory(
|
||||||
|
|||||||
@@ -32,7 +32,14 @@ class ApplicationDelegate: NSObject, UIApplicationDelegate {
|
|||||||
options.crashReportSource = "Application"
|
options.crashReportSource = "Application"
|
||||||
var error: NSError?
|
var error: NSError?
|
||||||
LibboxSetup(options, &error)
|
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()
|
setup()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user