GooglePlacesSwift Framework Reference

SearchMediaSupportable

@MainActor
@preconcurrency
protocol SearchMediaSupportable : View

A protocol for views that support search media options.

  • Adds search media options to a place view.

    When this is set, one or more searches through a place’s media may be performed, depending on the type of view that this modifier is applied on (e.g. for AdvancedPlaceSearchView and AdvancedPlaceListView, a search will be performed for each place in the list).

    If the search was a success, and there were results, they will be displayed for the place. In all other cases, the default content will be displayed instead as a fallback (if possible).

    Declaration

    Swift

    @MainActor
    func searchMediaOptions(_ options: SearchMediaOptions?, completion: (@Sendable ([Result<SearchMediaSummary, PlacesError>]) -> Void)? = nil) -> Self

    Parameters

    options

    The search options for the place’s media.

    completion

    The handler to be called when the searches are completed.

    Return Value

    The view with the closure added.