If you're looking to build search interfaces on iOS with Algolia, then you should check out InstantSearch iOS which is built on top of this library, and provides UI building blocks to build search experiences. Otherwise, keep reading.
InstantSearch Core for Swift
You can always find the latest version of the user documentation on Algolia Documentation.
If you use Swift version earlier than 4.2, you have to use the version 3.3 of InstantSearch Core. This version is outdated and not recommended for use.
CocoaPods is a dependency manager for Cocoa projects.
To install InstantSearch, simply add the following line to your Podfile:
pod 'InstantSearchCore', '~> 6.5'
pod 'InstantSearchCore', '~> 5.0'
pod 'InstantSearchcore', '~> 3.3'
Then, run the following command:
$ pod update
Carthage is a simple, decentralized dependency manager for Cocoa.
To install InstantSearch, simply add the following line to your Cartfile:
github "algolia/instantsearch-core-swift" ~> 6.5
github "algolia/instantsearch-core-swift" ~> 5.0
github "algolia/instantsearch-core-swift" ~> 3.3
Swift Package Manager
Swift Package Manager (SwiftPM) is a tool for managing the distribution of Swift code as well as C-family dependency. From Xcode 11, SwiftPM got natively integrated with Xcode.
InstantSearch Core support SwiftPM from version 6.4.0. To use SwiftPM, you should use Xcode 11 to open your project. Click
Swift Packages ->
Add Package Dependency, enter InstantSearch Core repo's URL.
After select the package, you can choose the dependency type (tagged version, branch or commit). Then Xcode will setup all the stuff for you.
If you're a framework author and use InstantSearch Core as a dependency, update your
let package = Package( // 6.5.0 ..< 7.0.0 dependencies: [ .package(url: "https://github.com/algolia/instantsearch-core-swift.git", from: "6.5.0") ], // ... )
InstantSearch Core iOS is Apache 2.0 licensed.
You may find interesting
InstantSearch Core 6.6 - 2020-02-13 23:00:11
- Introduce logging which allows to monitor the errors and widgets activities in the console.
Log severity level can be set via
Logger.minSeverityLevelproperty. The default value is
InstantSearch Core 6.4 - 2020-01-17 18:28:40
- Introduced connectors which makes the building of search experience using InstantSearch components even easier.
- Introduced trackers for out-of-the-box integration of Algolia Analytics in your apps
InstantSearch Second Iteration! - 2019-09-09 13:59:51
InstantSearch iOS is a library that helps you integrate various search interfaces with Algolia, built on top of the Swift API client.
InstantSearch iOS provides out of the box components that work together: search box, list of results, filtering and sorting interfaces, hierarchical menu, federated search, suggestions, highlighting, loading and more. It connects to Algolia servers, performs API calls for you and automatically updates the user interface with the latest state.
InstantSearch iOS allows you to focus on the look and feel of your user interface, by handling the search-specific logic for you, and simplifying management of complex state like filters, hierarchical menus or federated search.
Easy to integrate
InstantSearch easily fits into existing code: It follows a strict separation of concerns, has few dependencies, and doesn't make assumptions on how your app is built.
Components shipped in InstantSearch can easily be customised and configured, from high-level parameters to custom presentation logic.
Most common search use-cases are covered with these components.
Beyond those, writing your own component is as easy as implementing a single interface.
InstantSearch is a powerful tool for builders that want to stay in control.
Get started with InstantSearch iOS now.
3.0.0 - 2017-10-03 08:16:20
- Add support for Swift 4
Highlighter class: the
init method changed from
init(highlightAttrs: [String: Any]) to
init(highlightAttrs: [NSAttributedStringKey: Any]).
2.0.1 - 2017-07-31 14:53:13
- Add support for Carthage
2.0.0 - 2017-07-17 13:31:18
This new major release has been made to adapt this core library to the needs of the InstantSearch iOS library.
- Add more extensibility to the Searcher result handler methods. This brings changes in the signature of the
SearcherDelegatemethod and the
- For the
- For the
- For the
- Notifications sent when refinement changes through the
RefinementChangeNotificationnotification name. You can use the
userInfoFacetRefinementChangeKeyto listen to numeric and facet refinement changes.
- FacetResults class added that can be used for searchForFacetValues
- The Searcher now keeps the latest
resultsin its state
- Add helper to reverse highlights in a text
- Library's deployment iOS target moved from 9.3 to 8.0.
- 2017-04-03 15:53:47
- Upgrade to version 4.8 of the Swift API Client (fixes compilation issue)
- 2016-12-19 08:31:12
First official release! 🎉 Merry Christmas to everyone! 🎄⛄️🎁
- Leverage the new search for facet values feature of the Swift API Client.
Searcher.searchForFacetValues(...)works like the equivalent method on
Index, but automatically takes facet and numeric refinements into account, as well as the conjunctive/disjunctive state of facets.
- Limit number of pending requests per
Searcherinstance. This is to avoid stalling the request queue if response times are long. The limit can be adjusted via
- 2016-12-13 10:36:04
- Fix handling of numeric refinements when disjunctive faceting is used
- 2016-12-06 14:15:02
- [refact] Rebrand as "InstantSearch Core for Swift". Breaking change: Names of Git repository, module and pod have changed.
Searcherclass now accepts a delegate (in addition to result handlers and event notifications)
- [refact] New handling of query numeric and facet filters
- [doc] New documentation structure
- [test] Add unit tests for
- 2016-09-14 09:12:50
- Support Swift 3
- The naming has been revised to comply with the Swift API Design Guidelines
- Better Objective-C mappings
- Fix memory leaks
- Improve request cancellation
- 2016-08-16 12:58:22
Warning: Beta version. Until version 1.0 is released, incompatible changes may occur.
Searcherclass to manage a search session
HighlightRendererclass to render highlight markup into rich text
Debouncerclass to debounce frequent calls