setPredictionMode(_:for:)
setPredictionMode(_:for:)
setPredictionMode(_:for:) Instance Method of INUpcomingMediaManager Suggests how Siri should predict media intent shortcuts.
func setPredictionMode(_ mode: INUpcomingMediaPredictionMode, for type: INMediaItemType)Parameters
- mode: The prediction mode that Siri should use for your media intent shortcuts.
- type: The media type for this prediction mode.
Discussion
Apps such as podcast apps that want Siri to show only the suggested shortcuts—those set in the setSuggestedMediaIntents(:)) method and not media intents donated by your app for media the user has listened to or watched—should use the INUpcomingMediaPredictionMode.onlyPredictSuggestedIntents prediction mode. To tell Siri to show both donated and suggested media intent shortcuts associated with your app, use the INUpcomingMediaPredictionMode.default mode or don’t set any prediction mode for the media type.