---
title: "initWithProfileNumber:profileName:defaultProfile:"
framework: intents
role: symbol
role_heading: Instance Method
path: "intents/insetprofileincarintent/initwithprofilenumber:profilename:defaultprofile:"
---

# initWithProfileNumber:profileName:defaultProfile:

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

## Declaration

```occ
- (instancetype) initWithProfileNumber:(NSNumber *) profileNumber profileName:(NSString *) profileName defaultProfile:(NSNumber *) defaultProfile;
```

## 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.
- `defaultProfile`: A Boolean value that indicates whether the profile should become the default 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

- [initWithProfileNumber:profileName:defaultProfile:carName:](intents/insetprofileincarintent/initwithprofilenumber:profilename:defaultprofile:carname:.md)
- [initWithProfileNumber:profileLabel:defaultProfile:](intents/insetprofileincarintent/initwithprofilenumber:profilelabel:defaultprofile:.md)
