You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the window list used in this function can sometimes contain a window with a nil name, meaning the tracking will show as disabled even if its actually enabled.
func isWindowNameTrackingEnabled() -> Bool {
// 22.4.2020 - the latest privacy measures in Catalina require screen capture permission in order to access the window name of an application. See: https://stackoverflow.com/questions/56597221/detecting-screen-recording-settings-on-macos-catalina
guard let windows = CGWindowListCopyWindowInfo([.optionOnScreenOnly], kCGNullWindowID) as? [[String: AnyObject]] else { return false }
return windows.allSatisfy({ window in
let windowName = window[kCGWindowName as String] as? String
return windowName != nil
})
}
A quick fix is to check for at least one non-nil window belonging to an application other than PersonalAnalytics, but this might still give an erroneous status. Is there a better way to do this check?
The text was updated successfully, but these errors were encountered:
It seems that the window list used in this function can sometimes contain a window with a nil name, meaning the tracking will show as disabled even if its actually enabled.
A quick fix is to check for at least one non-nil window belonging to an application other than PersonalAnalytics, but this might still give an erroneous status. Is there a better way to do this check?
The text was updated successfully, but these errors were encountered: