---
title: nameComponents
framework: deviceactivity
role: symbol
role_heading: Instance Property
path: deviceactivity/deviceactivitydata/user-swift.struct/namecomponents
---

# nameComponents

Access the name of the person.

## Declaration

```swift
var nameComponents: PersonNameComponents?
```

## Discussion

Discussion You can use this property to construct the person’s name for display. Use the components with an instance of PersonNameComponentsFormatter to create a string representation for the current locale.

## See Also

### Identifying the person

- [appleID](deviceactivity/deviceactivitydata/user-swift.struct/appleid.md)
