---
title: "CFRunLoopObserverGetContext(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfrunloopobservergetcontext(_:_:)"
---

# CFRunLoopObserverGetContext(_:_:)

Returns the context information for a CFRunLoopObserver object.

## Declaration

```swift
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 doc://com.apple.corefoundation/documentation/CoreFoundation/CFRunLoopObserverCreate(_:_:_:_:_:_:) when creating observer.

## Discussion

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.

## See Also

### CFRunLoopObserver Miscellaneous Functions

- [CFRunLoopObserverCreateWithHandler(_:_:_:_:_:)](corefoundation/cfrunloopobservercreatewithhandler(_:_:_:_:_:).md)
- [CFRunLoopObserverCreate(_:_:_:_:_:_:)](corefoundation/cfrunloopobservercreate(_:_:_:_:_:_:).md)
- [CFRunLoopObserverDoesRepeat(_:)](corefoundation/cfrunloopobserverdoesrepeat(_:).md)
- [CFRunLoopObserverGetActivities(_:)](corefoundation/cfrunloopobservergetactivities(_:).md)
- [CFRunLoopObserverGetOrder(_:)](corefoundation/cfrunloopobservergetorder(_:).md)
- [CFRunLoopObserverGetTypeID()](corefoundation/cfrunloopobservergettypeid().md)
- [CFRunLoopObserverInvalidate(_:)](corefoundation/cfrunloopobserverinvalidate(_:).md)
- [CFRunLoopObserverIsValid(_:)](corefoundation/cfrunloopobserverisvalid(_:).md)
