<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSpellChecker/uniqueSpellDocumentTag()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSpellChecker(cm)uniqueSpellDocumentTag"
  },
  "title" : "uniqueSpellDocumentTag()"
}
-->

# uniqueSpellDocumentTag()

Returns a guaranteed unique tag to use as the spell-document tag for a document.

```
class func uniqueSpellDocumentTag() -> Int
```

## Return Value

Returns a unique tag to identified this spell checked object.

## Discussion

Use this method to generate tags to avoid collisions with other objects that can be spell checked.

---

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)