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

# name

The name of the device.

```
var name: String { get }
```

## Discussion

The default value of this property varies according to the device’s operating system version number:

|OS                |Default value            |Example                 |
|------------------|-------------------------|------------------------|
|iOS 15 and earlier|User-assigned device name|`"Ravi’s iPhone 13 Pro"`|
|iOS 16 and later  |Generic device name      |`"iPhone"`              |

In iOS, the *user-assigned device name* is available in the Settings app under General > About > Name. To access the user-assigned device name through this property in iOS 16 and later, your app must meet certain criteria and be assigned an entitlement. For information, see <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.device-information.user-assigned-device-name>.

> Related Sessions from WWDC22:
> Session 10096: [What’s new in privacy](https://developer.apple.com/videos/play/wwdc2022/10096)
> 
> Session 10068: [What’s new in UIKit](https://developer.apple.com/videos/play/wwdc2022/10068)

---

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)