init(restaurant:partySize:preferredBooking:maximumNumberOfResults:earliestBookingDateForResults:latestBookingDateForResults:)
Initializes the intent object with the specified reservation information.
Declaration
init(restaurant: INRestaurant, partySize: Int, preferredBooking preferredBookingDateComponents: DateComponents?, maximumNumberOfResults: NSNumber?, earliestBookingDateForResults: Date?, latestBookingDateForResults: Date?)Parameters
- restaurant:
The restaurant associated with the reservation.
- partySize:
The number of people in the guest’s party.
- preferredBookingDateComponents:
The date and time preferred by the user for the reservation.
- maximumNumberOfResults:
The maximum number of reservation results to return.
- earliestBookingDateForResults:
The earliest date for which to return results.
- latestBookingDateForResults:
The latest date for which to return results.
Return Value
An initialized intent object or nil if the object could not be created.
Discussion
Normally, you do not create instances of this class yourself. Instead, SiriKit creates instances when Maps asks you to provide the available reservations for the restaurant. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.