Skip to content

⚡️ A library of widgets and helpers to build instant-search applications on iOS.

License

Notifications You must be signed in to change notification settings

XiaowenVC/instantsearch-ios

This branch is 1 commit ahead of, 556 commits behind algolia/instantsearch-ios:master.

Folders and files

NameName
Last commit message
Last commit date
Apr 3, 2017
Sep 19, 2017
Dec 12, 2017
Dec 19, 2017
Dec 12, 2017
Oct 17, 2017
Dec 12, 2017
Oct 17, 2017
Nov 29, 2017
Jul 5, 2017
Dec 12, 2017
Oct 17, 2017
Sep 27, 2017
Dec 4, 2017
Sep 27, 2017
Dec 14, 2017
Dec 12, 2017
Dec 12, 2017
Dec 12, 2017
Jun 30, 2017
Oct 19, 2017

Repository files navigation

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.

InstantSearch iOS is a library 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 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:

pod 'InstantSearch-iOS', '~> 2.0.0'

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:

github "algolia/instantsearch-ios" ~> 2.0

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.

About

⚡️ A library of widgets and helpers to build instant-search applications on iOS.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 94.4%
  • Objective-C 3.9%
  • Ruby 1.3%
  • Other 0.4%