---
title: name
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsrecursivelock/name
---

# name

The name associated with the receiver.

## Declaration

```swift
var name: String? { get set }
```

## Discussion

Discussion You can use a name string to identify a lock within your code. Cocoa also uses this name as part of any error descriptions involving the receiver.
