---
title: "ivar_getTypeEncoding(_:)"
framework: Objective-C Runtime
role: symbol
role_heading: Function
platforms: [iOS 2.0+, iPadOS 2.0+, Mac Catalyst 13.1+, macOS 10.5+, tvOS 9.0+, visionOS 1.0+, watchOS 1.0+]
path: "objectivec/ivar_gettypeencoding(_:)"
---

# ivar_getTypeEncoding(_:)

Returns the type string of an instance variable.

## Declaration

```swift
func ivar_getTypeEncoding(_ v: Ivar) -> UnsafePointer<CChar>?
```

## Return Value

Return Value A C string containing the instance variable’s type encoding.

## Discussion

Discussion For possible values, see Objective-C Runtime Programming Guide > Type Encodings.

## See Also

### Working with Instance Variables

- [ivar_getName(_:)](objectivec/ivar_getname(_:).md)
- [ivar_getOffset(_:)](objectivec/ivar_getoffset(_:).md)
