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

# CGImageMetadataTagCopyNamespace(_:)

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

```
func CGImageMetadataTagCopyNamespace(_ tag: CGImageMetadataTag) -> CFString?
```

## Parameters

`tag`

The metadata tag from which to fetch the namespace information.

## Return Value

An immutable string that contains the tag’s namespace. For a list of public namespaces, see [XMP Namespaces and Prefixes](/documentation/ImageIO/xmp-namespaces-and-prefixes). You are responsible for releasing this string.

## Discussion

By convention, namespaces end with either a `/` or `#` character. For example, EXIF metadata uses the namespace `http://ns.adobe.com/exif/1.0/`. Custom namespaces must be a valid XML namespace.

---

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)