Guides / Building Search UI / Troubleshooting

InstantSearch iOS FAQ

Does Algolia support Dart and Flutter?

We don’t have an official API client for Dart. However, there are many options that you can go with:

  • Use the Algolia REST API directly. Keep in mind that there’s no retry strategy at the API level, and no guaranteed SLA.
  • Use an unofficial Dart API client. Keep in mind that we don’t provide any support for these, and there is no guaranteed SLA.
  • Use platform channels for integrating with iOS and Android hosts, then use the official Swift and Android clients we provide.

You can also check this tutorial to integrate Algolia with Flutter and Firestore.

Does Algolia support React Native?

Yes, we support React Native with our React InstantSearch library.

Why are Insights events not appearing on my dashboard?

There’s a slight delay because we send events in batches. We do this to minimize the number of requests and network consumption on mobile. You can change the batch size if you need to. Also note that there’s some processing on the server, so it could take a few extra minutes for events to appear. Finally, you can else enable logging for more visibility on when we send the events.

Which package managers do you support?

We make sure to support all popular package managers: Carthage, CocoaPods and Swift Package Manager.

How can I modify the query parameters?

Each searcher gives you access to the query property via searcher.indexQueryState.query. For example, if you want to modify the hitsPerPage parameter:

1
searcher.indexQueryState.query.hitsPerPage = 30

Why aren’t my filters applied when modifying the filterState?

When updating the filterState manually, you need to call filterState.notifyChange() for all components to update themselves with the new filterState. We require that you explicitly notify changes to avoid unnecessary Algolia requests when modifying several filters, and minimize the number of operations.

How can I apply filters only when the user clicks a button?

The filterState was designed to constantly connect with all other components for results to appear in real time. However, if you don’t need real time updates, you can copy of the original filterState, apply filters to it, and only copy back to the original filterState (the one linked to other components like the searcher) upon user action.

I am not seeing any results nor errors happening when trying out InstantSearch, what can I do?

In order to subscribe for errors, you can subscribe to the searcher errors in order to figure out what is going on. There could serialization issues among other issues.

1
2
3
4
searcher.onError.subscribePast(with: self) { (_, queryAndError) in
  let error = queryAndError.1
  print(error)
}

How can I setup a banner?

You need to listen to the searcher result update, extract the userData which contains the banner information, and then use that information to update your UI.

1
2
3
4
5
searcher.onResults.subscribe(with: self) { (_, results) in
    let bannerDict = searchResults.userData?.first?.object() as? [String: String]
    let msg = bannerDict?["promo_content"]
    // display msg in a banner if it is available
}

Did you find this page helpful?