Tweak how Sentry installation ID is read

This commit is contained in:
Shadowfacts 2023-05-28 21:04:29 -07:00
parent f84694b809
commit 878744b636
1 changed files with 2 additions and 3 deletions

View File

@ -115,9 +115,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
if let clazz = NSClassFromString("SentryInstallation"),
let objClazz = clazz as AnyObject as? NSObjectProtocol,
objClazz.responds(to: Selector(("id"))),
let id = objClazz.perform(Selector(("id"))).takeUnretainedValue() as? String {
let objClazz = clazz as AnyObject as? NSObject,
let id = objClazz.value(forKey: "id") as? String {
logger.info("Initialized Sentry with installation/user ID: \(id, privacy: .public)")
}
}