---
title: "xpc_get_type(_:)"
framework: xpc
role: symbol
role_heading: Function
path: "xpc/xpc_get_type(_:)"
---

# xpc_get_type(_:)

Returns the type of an object.

## Declaration

```swift
func xpc_get_type(_ object: xpc_object_t) -> xpc_type_t
```

## Parameters

- `object`: The object to examine.

## Return Value

Return Value An opaque pointer describing the type of the object. This pointer is suitable for direct comparison to exported type constants with the equality operator.

## See Also

### Identity

- [xpc_type_get_name(_:)](xpc/xpc_type_get_name(_:).md)
- [xpc_hash(_:)](xpc/xpc_hash(_:).md)
