---
title: keyName
framework: corespotlight
role: symbol
role_heading: Instance Property
path: corespotlight/cscustomattributekey/keyname
---

# keyName

The name of the custom attribute key.

## Declaration

```swift
var keyName: String { get }
```

## Discussion

Discussion The key name is a string that contains only ASCII characters and no punctuation other than the underscore (that is “_”). The prefix kMD is reserved. To create a custom attribute key name, it’s recommended that you use a reverse DNS format that includes your company name and does not include the period character (”.”). For example, a key name of the form com_mycompany_myapp_mykeyname works well.

## See Also

### Getting the attribute details

- [isMultiValued](corespotlight/cscustomattributekey/ismultivalued.md)
- [isSearchable](corespotlight/cscustomattributekey/issearchable.md)
- [isSearchableByDefault](corespotlight/cscustomattributekey/issearchablebydefault.md)
- [isUnique](corespotlight/cscustomattributekey/isunique.md)
