initWithProfileNumber:profileName:defaultProfile:carName:
Initializes the intent object with the specified profile name and index information.
Declaration
- (instancetype) initWithProfileNumber:(NSNumber *) profileNumber profileName:(NSString *) profileName defaultProfile:(NSNumber *) defaultProfile carName:(INSpeakableString *) carName;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
nilwhen creating a profile based on a numerical index. - defaultProfile:
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
An initialized intent object or nil if the object could not be created.
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.