<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ImageIO",
  "identifier" : "/documentation/ImageIO/CGImageMetadataTag",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Image I/O"
    ],
    "preciseIdentifier" : "c:@T@CGImageMetadataTagRef"
  },
  "title" : "CGImageMetadataTag"
}
-->

# CGImageMetadataTag

An immutable type that contains information about a single piece of image metadata.

```
class CGImageMetadataTag
```

## Overview

Each [`CGImageMetadataTag`](/documentation/ImageIO/CGImageMetadataTag) opaque type contains a single EXIF, IPTC, or XMP property. The namespace, prefix, name, type, and value of the tag identify different portions of the tag’s content. For example, the namespace specifies whether the tag is part of the EXIF metadata or a different set of metadata.

You retrieve existing metadata tags from an [`CGImageMetadata`](/documentation/ImageIO/CGImageMetadata) opaque type. You may also create new tags and add them to a [`CGMutableImageMetadata`](/documentation/ImageIO/CGMutableImageMetadata) type, before you assign the updated metadata to an image.

## Topics

### Creating a Metadata Tag

[`CGImageMetadataTagCreate(_:_:_:_:_:)`](/documentation/ImageIO/CGImageMetadataTagCreate(_:_:_:_:_:))

Creates a new image metadata tag, and fills it with the specified information.

### Getting the Attributes of the Tag

[`CGImageMetadataTagCopyNamespace(_:)`](/documentation/ImageIO/CGImageMetadataTagCopyNamespace(_:))

Returns an immutable copy of the tag’s XMP namespace.

[`CGImageMetadataTagCopyPrefix(_:)`](/documentation/ImageIO/CGImageMetadataTagCopyPrefix(_:))

Returns an immutable copy of the tag’s prefix.

[`CGImageMetadataTagCopyName(_:)`](/documentation/ImageIO/CGImageMetadataTagCopyName(_:))

Returns an immutable copy of the tag’s name.

[`CGImageMetadataTagCopyValue(_:)`](/documentation/ImageIO/CGImageMetadataTagCopyValue(_:))

Returns a shallow copy of the tag’s value, which is suitable only for reading.

[`CGImageMetadataTagCopyQualifiers(_:)`](/documentation/ImageIO/CGImageMetadataTagCopyQualifiers(_:))

Returns a shallow copy of the metadata tags that act as qualifiers for the current tag.

### Getting the Tag Type

[`CGImageMetadataTagGetType(_:)`](/documentation/ImageIO/CGImageMetadataTagGetType(_:))

Returns the type of the metadata tag’s value.

[`CGImageMetadataType`](/documentation/ImageIO/CGImageMetadataType)

Constants that indicate the XMP type for a metadata tag.

### Getting the Core Foundation Type

[`CGImageMetadataTagGetTypeID()`](/documentation/ImageIO/CGImageMetadataTagGetTypeID())

Returns the type identifier for the image metadata tag opaque type



---

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)