<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISearchTextField/allowsCopyingTokens",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISearchTextField(py)allowsCopyingTokens"
  },
  "title" : "allowsCopyingTokens"
}
-->

# allowsCopyingTokens

A Boolean that indicates whether the user can copy or drag tokens from the search field.

```
var allowsCopyingTokens: Bool { get set }
```

## Discussion

The default value for this property is <doc://com.apple.documentation/documentation/Swift/true>.

To support copying tokens, [`allowsCopyingTokens`](/documentation/UIKit/UISearchTextField/allowsCopyingTokens) must be <doc://com.apple.documentation/documentation/Swift/true> and the search field’s [`delegate`](/documentation/UIKit/UITextField/delegate) must also implement [`searchTextField(_:itemProviderForCopying:)`](/documentation/UIKit/UISearchTextFieldDelegate/searchTextField(_:itemProviderForCopying:)).

[`UISearchTextField`](/documentation/UIKit/UISearchTextField) enables the Copy command when a user selects text, even if the selection also includes tokens and [`allowsCopyingTokens`](/documentation/UIKit/UISearchTextField/allowsCopyingTokens) is <doc://com.apple.documentation/documentation/Swift/false>.

---

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)