Skip to content

Releases: algolia/algoliasearch-client-swift

4.6.1

10 Jan 09:17
Compare
Choose a tag to compare

Bug fixes

  • [offline] Fix reachability handling in onlineOnly request strategy

4.6

28 Dec 15:13
Compare
Choose a tag to compare
4.6

New features

  • [offline] Support manual building of local indices (MirroredIndex and OfflineIndex)
  • [offline] Support fallback logic when getting individual objects

Bug fixes

  • (#168) Use network reachability to decide whether to perform online requests
  • [offline] Fix race condition in instantiation of local index

4.5

07 Dec 14:12
Compare
Choose a tag to compare
4.5

Note: This new version brings a major improvement in the request retry logic (fallback mechanism used when one or more API hosts are down or unreachable). For that reason, an upgrade to this or a later version is strongly recommended for all users of this API Client.

New features

  • (#158) Support the responseFields query parameter

Bug fixes

  • (#157) New retry logic: stateful host statuses. This should help largely minimize the impact of DNS resolution failures or other long-lasting network problems. Note that the timeout for statuses can be controlled via the AbstractClient.hostStatusTimeout property.

Other changes

  • Support more than one polygon in the insidePolygon query parameter. Warning: This breaks backward-compatibility for this specific parameter.

4.4

18 Nov 18:27
Compare
Choose a tag to compare
4.4

New features

  • (#140) Support searching for facet values (Index.searchForFacetValues(...))
  • New method AbstractQuery.clear() to remove all parameters

Other changes

  • Open the Query class (along with some of its methods) to allow subclassing in other libraries
  • Make available as a static utility the method to build a query string from a dictionary of parameters (AbstractQuery.build(build(parameters:))

4.3

09 Nov 23:43
Compare
Choose a tag to compare
4.3

New features

4.2

02 Nov 09:45
Compare
Choose a tag to compare
4.2

New features

  • Add support for a list of languages in the ignorePlurals query parameter. Warning: This breaks backward-compatibility for this specific parameter.

Bug fixes

  • (#144) Fix compilation warning with Xcode 8.1

Other changes

  • (Objective-C bridging) Switch back to only one Query class. Note: This change is backward-compatible at the source level, provided that:
    • Objective-C code did not reference the BaseQuery type explicitly
    • Swift code did not reference the _objc_Query type explicitly

4.1

03 Oct 11:55
Compare
Choose a tag to compare
4.1

New features

  • Support the createIfNotExists parameter in partial updates
  • [offline] Offline-only indices

Bug fixes

  • (#134) Use new format version when retrieving index settings
  • Fix asynchronous dispatch of some completion handlers (were called outside the main thread)

Other changes

  • Rename attributesToIndex to searchableAttributes

4.0.1

15 Sep 17:15
Compare
Choose a tag to compare
  • Fix NSCopying support in Objective-C
  • [Offline mode] Upgrade to Offline Core 1.0

4.0

14 Sep 08:32
Compare
Choose a tag to compare
4.0

This is a new major version, bringing incompatible changes, most of them due to Swift 3 support.

Note: You can find a detailed change log and migration instructions in the Migration guide to version 4.x.

Warning: This version requires Swift 3; it will not compile with Swift 2.x.

Warning: Cocoapods support for Swift 3 requires Cocoapods 1.1.0.rc.2 or later.

Swift 3 support

  • Adapt to the new Foundation API
  • Follow the Swift API Design Guidelines:
    • Argument labels:
      • Omit the first argument when the function name contains a complement (e.g. addObject) or when the purpose is obvious (search: with a query)
      • Label the first argument when the purpose is not obvious and not contained in the method name (e.g. batch(operations:))
      • Label all completion handlers explicitly. This is the convention adopted by the system's libraries (e.g. URLSession.dataTask(with:completionHandler:). Since the completion handler is likely to be a closure, the block can be moved out of the call site anyway, so the label is only required when passing a function/block reference.
    • Method names:
      • browse is now overloaded: browse(query:) and browse(from:).
    • Rename enum members to lower camel case
    • Rename constants to lower camel case (except notification names)
  • Better Objective-C mappings
    • Adjust method names when necessary for a better fit with this language
    • Objective-C specific types are no longer visible in Swift (well, technically, they still are, but you have to look harder...)
    • No underscore-suffixed properties any longer
  • Better typing
    • Use Error instead of NSError in completion handlers
      • Use dedicated error types
    • Use @discardableResult for methods returning Operation
    • Use Notification.Name for notifications
  • Prevent subclassing by not adopting the open access modifier

Other breaking changes

  • (Swift only) Better typing of complex properties through enums
  • Rename Index.indexName to Index.name.
  • Refactor index search cache handling into two properties to enable/disable (searchCacheEnabled) it and set the expiration delay (searchCacheExpiringTimeInterval), and one method to clear it (clearSearchCache())
  • Rename "slaves" to "replicas"

Other improvements

  • Improve cancellation of Index.waitTask()
  • Add tests for Objective-C bridging (online flavor only)
  • Make timeouts configurable
  • Index instances are now shared across a Client

3.7

07 Sep 18:36
Compare
Choose a tag to compare
3.7
  • (#118) Add support for watchOS
  • (#120) Add an Index.getObjects() method with attributes to retrieve
  • Improve bandwidth usage of the "delete by query" helper
  • Fix memory leaks
  • Generate reference documentation for both the online and offline flavors