<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFRunLoopObserverGetContext(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFRunLoopObserverGetContext"
  },
  "title" : "CFRunLoopObserverGetContext(_:_:)"
}
-->

# CFRunLoopObserverGetContext(_:_:)

Returns the context information for a CFRunLoopObserver object.

```
func CFRunLoopObserverGetContext(_ observer: CFRunLoopObserver!, _ context: UnsafeMutablePointer<CFRunLoopObserverContext>!)
```

## Parameters

`observer`

The run loop observer to examine.

`context`

Upon return, contains the context information for `observer`. This is the same information passed to [`CFRunLoopObserverCreate(_:_:_:_:_:_:)`](/documentation/CoreFoundation/CFRunLoopObserverCreate(_:_:_:_:_:_:)) when creating `observer`.

## Discussion

The context version number for run loop observers is currently `0`. Before calling this function, you need to initialize the `version` member of `context` to `0`.

---

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)