---
title: "init(profileNumber:profileName:isDefaultProfile:carName:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/insetprofileincarintent/init(profilenumber:profilename:isdefaultprofile:carname:)"
---

# init(profileNumber:profileName:isDefaultProfile:carName:)

Initializes the intent object with the specified profile name and index information.

## Declaration

```swift
convenience init(profileNumber: Int? = nil, profileName: String? = nil, isDefaultProfile: Bool? = nil, carName: INSpeakableString? = nil)
```

## Parameters

- `profileNumber`: An integer number that indicates which profile to use. This value represents the index of the profile in your system. The index can be a soft index inside your vehicle’s electronics systems or it can correspond to physical buttons that the user presses.
- `profileName`: The name of the profile. Specify nil when creating a profile based on a numerical index.
- `isDefaultProfile`: A Boolean value that indicates whether the profile should become the default profile.
- `carName`: The name of the car associated with the profile.

## Return Value

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

## Discussion

Discussion Normally, you don’t create instances of this class yourself. Instead, Siri creates instances when the user asks to restore settings from a profile. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.

## See Also

### Initializing the Intent Object

- [init(profileNumber:profileLabel:defaultProfile:)](intents/insetprofileincarintent/init(profilenumber:profilelabel:defaultprofile:).md)
- [init(defaultProfile:)](intents/insetprofileincarintent/init(defaultprofile:).md)
- [init(profileLabel:)](intents/insetprofileincarintent/init(profilelabel:).md)
- [init(profileLabel:defaultProfile:)](intents/insetprofileincarintent/init(profilelabel:defaultprofile:).md)
- [init(profileLabel:isDefaultProfile:)](intents/insetprofileincarintent/init(profilelabel:isdefaultprofile:).md)
- [init(profileName:defaultProfile:)](intents/insetprofileincarintent/init(profilename:defaultprofile:).md)
- [init(profileNumber:defaultProfile:)](intents/insetprofileincarintent/init(profilenumber:defaultprofile:).md)
- [init(profileNumber:profileLabel:)](intents/insetprofileincarintent/init(profilenumber:profilelabel:).md)
- [init(profileNumber:profileLabel:isDefaultProfile:)](intents/insetprofileincarintent/init(profilenumber:profilelabel:isdefaultprofile:).md)
- [init(profileNumber:profileName:defaultProfile:)](intents/insetprofileincarintent/init(profilenumber:profilename:defaultprofile:).md)
