---
title: "init(phoneNumber:nameComponents:displayName:image:rating:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/inridedriver/init(phonenumber:namecomponents:displayname:image:rating:)"
---

# init(phoneNumber:nameComponents:displayName:image:rating:)

Initializes and returns a ride driver object using a set of name components and other driver information.

## Declaration

```swift
init(phoneNumber: String, nameComponents: PersonNameComponents?, displayName: String?, image: INImage?, rating: String?)
```

## Parameters

- `phoneNumber`: The driver’s phone number. The user should be able to contact the driver at this number to coordinate ride details.
- `nameComponents`: The name of the driver, specified as a set of name components.
- `displayName`: The name of the driver in a user-readable format. This string is displayed to the user by Siri or Maps.
- `image`: A picture of the driver.
- `rating`: The driver’s rating. Strings should be short and informative. For example, you might specify the string “Good” or a string containing Unicode star (★, ☆) characters.

## Return Value

Return Value An initialized driver object or nil if the object could not be created.

## Discussion

Discussion You can’t change the driver information after initialization, so specify as much information as you have.

## See Also

### Initializing a Ride Driver Object

- [init(handle:displayName:image:rating:phoneNumber:)](intents/inridedriver/init(handle:displayname:image:rating:phonenumber:).md)
- [init(handle:nameComponents:image:rating:phoneNumber:)](intents/inridedriver/init(handle:namecomponents:image:rating:phonenumber:).md)
- [init(personHandle:nameComponents:displayName:image:rating:phoneNumber:)](intents/inridedriver/init(personhandle:namecomponents:displayname:image:rating:phonenumber:).md)
