Instance Method

initWithIntent:response:

Initializes and returns an interaction object with an intent object and your app’s response.

Declaration

- (instancetype)initWithIntent:(INIntent *)intent response:(INIntentResponse *)response;

Parameters

intent

The intent object containing the user’s request.

response

The response object that your app provided in response to the intent.

Return Value

An initialized interaction object or nil if the object could not be created.

Discussion

Use this method to initialize interaction objects that you intend to donate. You do not need to create interaction objects for any custom NSUserActivity objects that you create during the handling of an intent. SiriKit automatically creates an instance of this class before delivering an NSUserActivity object to your app.