---
title: "IOSurfaceGetPropertyMaximum(_:)"
framework: IOSurface
role: symbol
role_heading: Function
platforms: [iOS 11.0+, iPadOS 11.0+, Mac Catalyst 13.1+, macOS 10.6+, tvOS 11.0+, visionOS 1.0+]
path: "iosurface/iosurfacegetpropertymaximum(_:)"
---

# IOSurfaceGetPropertyMaximum(_:)

Returns the maximum value for a given property that is guaranteed to be compatible with all of the current devices (GPUs, etc.) in the system.

## Declaration

```swift
func IOSurfaceGetPropertyMaximum(_ property: CFString) -> Int
```

## Discussion

Discussion The most important values to obtain are: kIOSurfaceBytesPerRow kIOSurfaceWidth kIOSurfaceHeight kIOSurfacePlaneBytesPerRow kIOSurfacePlaneWidth kIOSurfacePlaneHeight For the width and height properties, the maximum values are the largest that are guaranteed to work for both reading and writing. In OpenGL terms this translates into the largest size that will work for both textures and render targets. This function returns 0 for properties that have no predefined limit or where the concept of a limit would be considered invalid (such as kIOSurfacePixelFormat).

## See Also

### Functions

- [IOSurfaceAlignProperty(_:_:)](iosurface/iosurfacealignproperty(_:_:).md)
- [IOSurfaceAllowsPixelSizeCasting(_:)](iosurface/iosurfaceallowspixelsizecasting(_:).md)
- [IOSurfaceCopyAllValues(_:)](iosurface/iosurfacecopyallvalues(_:).md)
- [IOSurfaceCopyValue(_:_:)](iosurface/iosurfacecopyvalue(_:_:).md)
- [IOSurfaceCreate(_:)](iosurface/iosurfacecreate(_:).md)
- [IOSurfaceCreateMachPort(_:)](iosurface/iosurfacecreatemachport(_:).md)
- [IOSurfaceCreateXPCObject(_:)](iosurface/iosurfacecreatexpcobject(_:).md)
- [IOSurfaceDecrementUseCount(_:)](iosurface/iosurfacedecrementusecount(_:).md)
- [IOSurfaceGetAllocSize(_:)](iosurface/iosurfacegetallocsize(_:).md)
- [IOSurfaceGetBaseAddress(_:)](iosurface/iosurfacegetbaseaddress(_:).md)
- [IOSurfaceGetBaseAddressOfPlane(_:_:)](iosurface/iosurfacegetbaseaddressofplane(_:_:).md)
- [IOSurfaceGetBitDepthOfComponentOfPlane(_:_:_:)](iosurface/iosurfacegetbitdepthofcomponentofplane(_:_:_:).md)
- [IOSurfaceGetBitOffsetOfComponentOfPlane(_:_:_:)](iosurface/iosurfacegetbitoffsetofcomponentofplane(_:_:_:).md)
- [IOSurfaceGetBytesPerElement(_:)](iosurface/iosurfacegetbytesperelement(_:).md)
- [IOSurfaceGetBytesPerElementOfPlane(_:_:)](iosurface/iosurfacegetbytesperelementofplane(_:_:).md)
