fix: check on shacking motion in toggling window
This commit is contained in:
parent
f60a443eed
commit
8ffd2b589b
|
|
@ -30,7 +30,7 @@ public struct TILogger: LoggerRepresentable {
|
|||
@available(iOS 12, *)
|
||||
public static let defaultLogger = TILogger(subsystem: .defaultSubsystem ?? "", category: .pointsOfInterest)
|
||||
|
||||
public let logInfo: OSLog
|
||||
public let logInfo: NSLog
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,18 @@ class LoggingTogglingWindow: UIWindow {
|
|||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
open override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) {
|
||||
guard let rootView = rootViewController else { return }
|
||||
|
||||
guard let loggingController = rootView.presentedViewController as? LoggingTogglingViewController else {
|
||||
return
|
||||
}
|
||||
|
||||
if motion == .motionShake {
|
||||
loggingController.openLoggingScreen()
|
||||
}
|
||||
}
|
||||
|
||||
override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
|
||||
guard let rootView = rootViewController else { return false }
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ open class LogsStorageViewModel {
|
|||
preCompletion?()
|
||||
|
||||
DispatchQueue.global(qos: .userInitiated).async { [weak self] in
|
||||
let logStore = try? OSLogStore(scope: .currentProcessIdentifier)
|
||||
let logStore = try? OSLogStore(scope: .system)
|
||||
let entries = try? logStore?.getEntries()
|
||||
|
||||
let logs = entries?
|
||||
|
|
|
|||
Loading…
Reference in New Issue