Swiftpack.co - Package - algolia/instantsearch-core-swift

Warning: Migrated

InstantSearch Core has been migrated to the main InstantSearch repository. You still can use the Core part of the InstantSearch separately from UI components by following the provided instructions. This repository is no longer supported, please create your issues and submit your contributions to the main InstantSearch repository.

InstantSearch iOS

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

This is the InstantSearch Core library for Swift, built on top of Algolia's Swift API Client, using Algolia's Search API. It works on macOS, iOS, tvOS and watchOS.

You can always find the latest version of the user documentation on Algolia Documentation.

Installation

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

CocoaPods is a dependency manager for Cocoa projects.

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

Swift 5.0

pod 'InstantSearchCore', '~> 6.5'

Swift 4.2+

pod 'InstantSearchCore', '~> 5.0'

Swift 4.1

pod 'InstantSearchcore', '~> 3.3'

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 5.0

github "algolia/instantsearch-core-swift" ~> 6.5 

Swift 4.2+

github "algolia/instantsearch-core-swift" ~> 5.0 

Swift 4.1

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 File -> 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 Package.swift file:

let package = Package(
    // 6.5.0 ..< 7.0.0
    dependencies: [
        .package(url: "https://github.com/algolia/instantsearch-core-swift.git", from: "6.5.0")
    ],
    // ...
)

License

InstantSearch Core iOS is Apache 2.0 licensed.

Github

link
Stars: 18

Dependencies

Used By

Total: 0

Releases

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.minSeverityLevel property. The default value is .info

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.

Accelerates development

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.

Manages complexity

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.

Customizable

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

Swift Version

  • Add support for Swift 4

Backward incompatibility

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

Dependency Managers

  • 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.

New Features

  • Add more extensibility to the Searcher result handler methods. This brings changes in the signature of the SearcherDelegate method and the searcher.resultHandlers:
    • For the SearcherDelegate: From searcher(_:didReceive:error:params:) to searcher(_:didReceive:error:userInfo:)
    • For the searcher.resultHandlers: From (results:error:) to (results:error:userInfo:)
  • Notifications sent when refinement changes through the RefinementChangeNotification notification name. You can use the userInfoNumericRefinementChangeKey and userInfoFacetRefinementChangeKey to listen to numeric and facet refinement changes.
  • FacetResults class added that can be used for searchForFacetValues
  • The Searcher now keeps the latest hits and results in 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

Bug fixes

  • 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! 🎄⛄️🎁

New features

  • 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.

Bug fixes

  • Limit number of pending requests per Searcher instance. This is to avoid stalling the request queue if response times are long. The limit can be adjusted via Searcher.maxPendingRequests.

- 2016-12-13 10:36:04

Bug fixes

  • 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.
  • The Searcher class 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 Highlighter

- 2016-09-14 09:12:50

New features

  • Support Swift 3
    • The naming has been revised to comply with the Swift API Design Guidelines
    • Better Objective-C mappings
  • New SearchProgressController class

Bug fixes

  • 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.

New features

  • Searcher class to manage a search session
  • HighlightRenderer class to render highlight markup into rich text
  • Debouncer class to debounce frequent calls