---
title: "CGImageMetadataTagCopyNamespace(_:)"
framework: imageio
role: symbol
role_heading: Function
path: "imageio/cgimagemetadatatagcopynamespace(_:)"
---

# CGImageMetadataTagCopyNamespace(_:)

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

## Declaration

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

## Parameters

- `tag`: The metadata tag from which to fetch the namespace information.

## Return Value

Return Value An immutable string that contains the tag’s namespace. For a list of public namespaces, see XMP Namespaces and Prefixes. You are responsible for releasing this string.

## Discussion

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.

## See Also

### Getting the Attributes of the Tag

- [CGImageMetadataTagCopyPrefix(_:)](imageio/cgimagemetadatatagcopyprefix(_:).md)
- [CGImageMetadataTagCopyName(_:)](imageio/cgimagemetadatatagcopyname(_:).md)
- [CGImageMetadataTagCopyValue(_:)](imageio/cgimagemetadatatagcopyvalue(_:).md)
- [CGImageMetadataTagCopyQualifiers(_:)](imageio/cgimagemetadatatagcopyqualifiers(_:).md)
