Skip to content
⚡️ A library of widgets and helpers to build instant-search applications on iOS.
Branch: master
Clone or download
PLNech and spinach Update CHANGELOG.md
Co-Authored-By: spinach <guydaher1@gmail.com>
Latest commit b247e6d Feb 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add template for Issues and PRs Dec 5, 2018
InstantSearch.xcodeproj feat(swift): support for swift 4.2 Sep 26, 2018
InstantSearchTestsHost Version 3.1.3 Jan 11, 2019
Sources Sovle bug of key observer for iOS 10 and below. Jan 11, 2019
Tests
Tools feat(fastlane): add jazzy and publish website to fastlane Oct 17, 2017
config
docgen Fix all links to the community website, and redirect to main docs Mar 27, 2019
fastlane Bitrise submit pr bug (#61) Dec 11, 2018
instantsearch.xcodeproj - Add Objc Support for the ViewModels Nov 28, 2018
.gitattributes chore(docgen): mark as documentation for GitHub Jul 5, 2017
.gitignore Remove the now ignored directory "InstantSearchDemo" Dec 12, 2017
.jazzy.yaml feat(fastlane): add jazzy and publish website to fastlane Oct 17, 2017
.swift-version update all dependencies and solve few warnings Sep 27, 2018
.travis.yml Fix dependency versions and travis Sep 27, 2017
CHANGELOG.md Update CHANGELOG.md Mar 27, 2019
Cartfile update all dependencies and solve few warnings Sep 27, 2018
Cartfile.resolved
Gemfile fix jazzy issue when generating documentation to community website Nov 1, 2018
Gemfile.lock ci(pr): submit pull request instead of pushing to remote. Dec 11, 2018
InstantSearch.podspec Version 3.1.3 Jan 11, 2019
LICENSE.md docs(readme): write readme file of InstantSearch iOS Jun 30, 2017
Readme.md Fix all links to the community website, and redirect to main docs Mar 27, 2019

Readme.md

InstantSearch iOS

Platform iOS Swift 4 compatible Objective-C compatible CocoaPods compatible License: MIT

By Algolia.

InstantSearch family: InstantSearch iOS | InstantSearch Android | React InstantSearch | InstantSearch.js | Angular InstantSearch | Vue InstantSearch.

InstantSearch iOS is a framework providing widgets and helpers to help you build the best instant-search experience on iOS with Algolia. It is built on top of Algolia's Swift API Client library to provide you a high-level solution to quickly build various search interfaces.

Demo

You can see InstantSearch iOS in action in our Examples repository, in which we published example apps built with InstantSearch and written in Swift:

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

To install InstantSearch, simply add the following line to your Podfile:

Swift 4.2

pod 'InstantSearch', '~> 3.0'
# pod 'InstantSearch/Widgets' for access to everything
# pod 'InstantSearch/Core' for access to everything except the UI widgets
# pod 'InstantSearch/Client' for access only to the API Client

Swift 4.1

pod 'InstantSearch', '~> 2.0'
# pod 'InstantSearch/Widgets' for access to everything
# pod 'InstantSearch/Core' for access to everything except the UI widgets
# pod 'InstantSearch/Client' for access only to the API Client

Then, run the following command:

$ pod update

Carthage

Carthage is a simple, decentralized dependency manager for Cocoa.

To install InstantSearch, simply add the following line to your Cartfile:

Swift 4.2

github "algolia/instantsearch-ios" ~> 3.0 # for access to everything
# github "algolia/instantsearch-core-swift" ~> 4.0 # for access to everything except the UI widgets
# github "algolia/algoliasearch-client-swift" ~> 6.0 # for access only to the API Client

Swift 4.1

github "algolia/instantsearch-ios" ~> 2.0 # for access to everything
# github "algolia/instantsearch-core-swift" ~> 3.0 # for access to everything except the UI widgets
# github "algolia/algoliasearch-client-swift" ~> 5.0 # for access only to the API Client

SwiftPM

The API client is the only library of the framework available on SwiftPM.

Swift 4.2

To install the API Client, add .package(url:"https://github.com/algolia/algoliasearch-client-swift", from: "6.0.0") to your package dependencies array in Package.swift, then add AlgoliaSearch to your target dependencies.

Swift 4.1

To install the API Client, add .package(url:"https://github.com/algolia/algoliasearch-client-swift", from: "5.0.0") to your package dependencies array in Package.swift, then add AlgoliaSearch to your target dependencies.

Documentation

You can start with the Getting Started Guide.

Learn more about instantSearch iOS in the dedicated documentation website.

Basic Usage

In your AppDelegate.swift:

import InstantSearch

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    // Configure InstantSearch
    InstantSearch.shared.configure(appID: "latency", apiKey: "1f6fd3a6fb973cb08419fe7d288fa4db", index: "bestbuy_promo")
}

In your ViewController.swift:

import InstantSearch

override func viewDidLoad() {
    super.viewDidLoad()

    let searchBar = SearchBarWidget(frame: CGRect(x: 20, y: 30, width: 300, height: 40))
    let statsWidget = StatsLabelWidget(frame: CGRect(x: 20, y: 80, width: 300, height: 50))
    self.view.addSubview(searchBar)
    self.view.addSubview(statsWidget)

    // Add all widgets in view to InstantSearch
    InstantSearch.shared.registerAllWidgets(in: self.view)
}

Run your app and you will the most basic search experience: a UISearchBar with the number of results each time you write a query.

To get a more meaningful search experience, please follow our Getting Started Guide.

Getting Help

Getting involved

  • If you want to contribute please feel free to submit pull requests.
  • If you have a feature request please open an issue.
  • If you use InstantSearch in your app, we would love to hear about it! Drop us a line on discourse or twitter.

License

InstantSearch iOS is MIT licensed.

You can’t perform that action at this time.