<!--
{
  "availability" : [
    "iOS: 17.2.0 -",
    "iPadOS: 17.2.0 -",
    "macCatalyst: 17.2.0 -",
    "macOS: 14.2.0 -",
    "tvOS: 17.2.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ImageIO",
  "identifier" : "/documentation/ImageIO/CGImageSourceSetAllowableTypes(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Image I/O"
    ],
    "preciseIdentifier" : "c:@F@CGImageSourceSetAllowableTypes"
  },
  "title" : "CGImageSourceSetAllowableTypes(_:)"
}
-->

# CGImageSourceSetAllowableTypes(_:)

Restricts which image formats can be decoded in the current process.

```
func CGImageSourceSetAllowableTypes(_ allowableTypes: CFArray) -> OSStatus
```

## Parameters

`allowableTypes`

A <doc://com.apple.documentation/documentation/CoreFoundation/CFArray> containing <doc://com.apple.documentation/documentation/CoreFoundation/CFString> Uniform Type Identifiers (UTIs) of allowed image formats.

## Discussion

When this method has been called, ImageIO will only decode images whose format matches one of the entries in the allow list for the remaining lifetime of the process.

If per-asset format restrictions are set via [`kCGImageSourceAllowableTypes`](/documentation/ImageIO/kCGImageSourceAllowableTypes),
only formats allowed by both mechanisms are permitted.
If `allowableTypes` is empty, all image parsing is disabled.
Unknown format identifiers are ignored.
Can only be called once per process; subsequent calls are ignored.

See also <doc://com.apple.documentation/documentation/UniformTypeIdentifiers/system-declared-uniform-type-identifiers>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)