init(code:userActivity:)
Creates a response object with the specified code and user activity.
Declaration
init(code: INListCarsIntentResponseCode, userActivity: NSUserActivity?)Parameters
- code:
The response code that indicates success or failure when confirming or handling the intent. For a list of possible values, see Inlistcarsintentresponsecode.
- userActivity:
A user activity that the system passes to your app if it launches as a result of this response. Use an activity if you need to provide additional information specific to your app.
If you specify
nil, the system automatically:Creates a user activity for you.
Sets the activity’s type to the class name of the intent it’s handling.
Sets the activity’s Interaction property to an instance of Ininteraction that contains the intent and your response.