---
title: "AXObserverCreateWithInfoCallback(_:_:_:)"
framework: Application Services
role: symbol
role_heading: Function
platforms: [macOS 10.9+]
path: applicationservices/1460610-axobservercreatewithinfocallback
---

# AXObserverCreateWithInfoCallback(_:_:_:)

Creates a new observer that can receive notifications with an information dictionary from the specified application.

## Declaration

```swift
func AXObserverCreateWithInfoCallback(_ application: pid_t, _ callback: AXObserverCallbackWithInfo, _ outObserver: UnsafeMutablePointer<AXObserver?>) -> AXError
```

## Parameters

- `application`: The process ID of the application.
- `callback`: The callback function.
- `outObserver`: On return, an AXObserverRef representing the observer object.

## Return Value

Return Value If unsuccessful, AXObserverCreateWithInfoCallback may return one of the following error codes, among others:

## Discussion

Discussion When an observed notification is received, it is passed to AXObserverCallbackWithInfo.

## See Also

### Notification API

- [AXObserverAddNotification(_:_:_:_:)](applicationservices/1462089-axobserveraddnotification.md)
- [AXObserverCreate(_:_:_:)](applicationservices/1460133-axobservercreate.md)
- [AXObserverGetRunLoopSource(_:)](applicationservices/1459139-axobservergetrunloopsource.md)
- [AXObserverGetTypeID()](applicationservices/1461244-axobservergettypeid.md)
- [AXObserverRemoveNotification(_:_:_:)](applicationservices/1462066-axobserverremovenotification.md)
