Swift Objective-C Other
Latest commit e5c45ab Aug 17, 2017 @spinach spinach committed on GitHub Update Readme.md
Permalink
Failed to load latest commit information.
.github New Framework template used Apr 3, 2017
InstantSearch.xcodeproj/xcshareddata/xcschemes refactor(folder): solve signing certificate warning Apr 12, 2017
InstantSearchTestsHost feat(testHost): add a test host in order for tests to target it. in t… May 22, 2017
Sources fix(user-agent): Change user agent from "InstantSearch" to "InstantSe… Aug 1, 2017
Tests fix(access-control): change access level from public to internal for … Jun 27, 2017
Tools feat(deploy): add script to deploy the docs folder to community.algol… Jul 12, 2017
docgen fix(readme): update top image Jul 21, 2017
instantsearch.xcodeproj refac(swiftlint): add swiftlint as a build phase run script. Aug 8, 2017
.gitattributes chore(docgen): mark as documentation for GitHub Jul 5, 2017
.gitignore doc(example): submit gitignore Aug 4, 2017
.jazzy.yaml feat(deploy): add script to deploy the docs folder to community.algol… Jul 12, 2017
.swift-version chore(swift): add swift version file used by CocoaPods Jun 12, 2017
.swiftlint.yml chore(linter): change file length limit of swiftlint Jun 26, 2017
.travis.yml New Framework template used Apr 3, 2017
CHANGELOG.md docs(changelog): support for carthage Jul 31, 2017
Cartfile fix(carthage): fix uppercase CartFile to Cartfile Jul 31, 2017
Cartfile.resolved feat(carthage): add carthage support to InstantSearch by removing dep… Jul 31, 2017
InstantSearch-iOS.podspec Version 1.0.0 Jul 17, 2017
LICENSE.md docs(readme): write readme file of InstantSearch iOS Jun 30, 2017
Podfile fix(version): change version of InstantSearch-Core-Swift from v2-beta… Jul 17, 2017
Readme.md Update Readme.md Aug 17, 2017

Readme.md

InstantSearch iOS

Platform iOS Swift 3 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', '~> 1.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" ~> 1.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.