title: How to set the searchBar as the global focus for Siri on the Search Page?
body: <h2>Description</h2>
  
  <p>In my tvOS application, I have a search page with on top a <code>Search Bar</code> and under a <code>Table View</code> with the eventual list of results.</p>
  
  <p>While we are focusing the <code>searchBar</code> and the user presses the voice for Siri, the results get inserted into the Search Bar (as expected). However, when the user is scrolling down through the results and is unable to find what they're looking for, they have to scroll up (all the way back up) to the <code>searchBar</code> to use Siri again.</p>
  
  <p>If the user attempts to use Siri while the <code>searchBar</code> is NOT in focus, a global Siri starts looking for results in different apps (which is not what I want)</p>
  
  <h2>Question:</h2>
  
  <p>How to set the searchBar as the global focus for Siri on the Search Page?</p>
  
  <h2>What I've tried:</h2>
  
  <p>To be honest I have no idea how to go about this..</p>
  
  <p>A function is called in AppDelegate.swift to create the Search View Controller and add it to the Tab Bar Controller.</p>
  
  <p>I've thought about trying preferedFocusView but after reading the documentation, I doubt that's going to work.</p>
  
  <pre><code>func configueSearchController() -&gt; UIViewController {
  
          let storyboard = UIStoryboard(name: "Search", bundle: nil)
          guard let searchResultsController = storyboard.instantiateViewController(withIdentifier: SearchViewController.storyboardIdentifier) as? SearchViewController else {
              fatalError("Unable to instatiate a SearchResultViewController from the storyboard.")
          }
  
          /*
           Create a UISearchController, passing the `searchResultsController` to
           use to display search results.
           */
  
          let searchController = UISearchController(searchResultsController: searchResultsController)
          searchController.searchResultsUpdater = searchResultsController
          searchController.searchBar.placeholder = NSLocalizedString("Enter keyword (e.g. Gastric Bypass)", comment: "")
          searchController.view.backgroundColor = Constants.Color.backgroundcolor
          searchController.searchBar.keyboardAppearance = UIKeyboardAppearance.dark
          searchController.searchBar.tintColor = Constants.Color.backgroundcolor
          searchController.searchBar.backgroundColor = Constants.Color.backgroundSearchBarColor
          searchController.searchBar.setTextColor(color: .white)
          searchController.hidesNavigationBarDuringPresentation = false
          searchController.obscuresBackgroundDuringPresentation = true
          searchController.searchBar.searchBarStyle = .minimal
          searchController.searchBar.sizeToFit()
          searchController.searchBar.focus
  
  
          //TODO: Check if this works
          searchController.searchBar.accessibilityLanguage = "en"
  
          //searchResultsController.tableView.tableHeaderView = searchController.searchBar
  
          // Contain the `UISearchController` in a `UISearchContainerViewController`.
          let searchContainer: UISearchContainerViewController = UISearchContainerViewController(searchController: searchController)
  
          // Finally contain the `UISearchContainerViewController` in a `UINavigationController`.
          let searchNavigationController = UINavigationController(rootViewController: searchContainer)
          searchNavigationController.navigationBar.isTranslucent = true
          searchNavigationController.navigationBar.tintColor = Constants.Color.backgroundcolor
          searchNavigationController.tabBarItem.title = "Search"
          return searchNavigationController
  
  }
  </code></pre>