<!--
{
  "availability" : [
    "macCatalyst: 13.1.0 -",
    "macOS: 10.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGSessionCopyCurrentDictionary()",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@F@CGSessionCopyCurrentDictionary"
  },
  "title" : "CGSessionCopyCurrentDictionary()"
}
-->

# CGSessionCopyCurrentDictionary()

Returns information about the caller’s window server session.

```
func CGSessionCopyCurrentDictionary() -> CFDictionary?
```

## Return Value

A window server session dictionary, or `NULL` if the caller is not running within a Quartz GUI session or the window server is disabled. You should release the dictionary when you are finished using it. For information about the key-value pairs in this dictionary, see [Window Server Session Properties](/documentation/CoreGraphics/window-server-session-properties).

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)