Fix how we're getting the Sentry installation ID
This commit is contained in:
parent
f3cf2dd8ec
commit
b4693252be
|
@ -123,12 +123,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
event.context?.removeValue(forKey: "culture")
|
event.context?.removeValue(forKey: "culture")
|
||||||
return Preferences.shared.reportErrorsAutomatically ? event : nil
|
return Preferences.shared.reportErrorsAutomatically ? event : nil
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if let clazz = NSClassFromString("SentryInstallation"),
|
if let clazz = NSClassFromString("SentryInstallation"),
|
||||||
let objClazz = clazz as AnyObject as? NSObject,
|
let objClazz = clazz as AnyObject as? NSObject,
|
||||||
let id = objClazz.value(forKey: "id") as? String {
|
let id = objClazz.perform(Selector(("idWithCacheDirectoryPath:")), with: options.cacheDirectoryPath).takeUnretainedValue() as? String {
|
||||||
logger.info("Initialized Sentry with installation/user ID: \(id, privacy: .public)")
|
logger.info("Initialized Sentry with installation/user ID: \(id, privacy: .public)")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue