forked from shadowfacts/Tusker
Log Sentry installation ID
So when the user taps Get Support and logs are sent we can cross-ref with recent crashes
This commit is contained in:
parent
849882287f
commit
4931665b45
|
@ -14,6 +14,7 @@ import UserAccounts
|
|||
import ComposeUI
|
||||
|
||||
let stateRestorationLogger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "StateRestoration")
|
||||
private let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "AppDelegate")
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
@ -94,6 +95,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
return Preferences.shared.reportErrorsAutomatically ? event : nil
|
||||
}
|
||||
}
|
||||
|
||||
if let clazz = NSClassFromString("SentryInstallation"),
|
||||
let objClazz = clazz as AnyObject as? NSObjectProtocol,
|
||||
objClazz.responds(to: Selector(("id"))),
|
||||
let id = objClazz.perform(Selector(("id"))).takeRetainedValue() as? String {
|
||||
logger.info("Initialized Sentry with installation/user ID: \(id)")
|
||||
}
|
||||
}
|
||||
|
||||
override func buildMenu(with builder: UIMenuBuilder) {
|
||||
|
|
Loading…
Reference in New Issue