Instance Method

resolvePeopleInPhotoForSearchForPhotos:withCompletion:

Resolves the people in the photos.

Declaration

- (void)resolvePeopleInPhotoForSearchForPhotos:(INSearchForPhotosIntent *)intent withCompletion:(void (^)(NSArray<INPersonResolutionResult *> *resolutionResults))completion;

Parameters

intent

The intent object containing details about the user’s request. Use this object to get the initial information, if any, provided by the user.

completion

The block to execute with the resolution. You must execute this block at some point during your implementation of this method. This block has no return value and takes the following parameter:

resolutionResults

The object containing the details of your proposed resolution. For each successful resolution, create a resolution object with the INPerson object that you can use to identify the user later.

Discussion

Implement this method to resolve the people in the photos. Use the information in the intent object to identify the corresponding users in your app. Always strive toward a successful resolution of the specified users, but feel free to ask for confirmation for one or more users if there is some uncertainty.

If you find multiple users matching the same name, consider asking the user to disambiguate from among the most likely candidates. When disambiguating users, provide as few choices as possible. If you find more than five possible users, consider another resolution.

See Also

Resolving the Intent Parameters

- resolveDateCreatedForSearchForPhotos:withCompletion:

Resolves the taken dates for the photos.

- resolveAlbumNameForSearchForPhotos:withCompletion:

Resolves the name of the photo album containing the photos.

- resolveSearchTermsForSearchForPhotos:withCompletion:

Resolves any search terms provided by the user.