Skip to content

Releases: algolia/algoliasearch-client-swift

4.0.1

15 Sep 17:15

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

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

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

3.6

09 Aug 09:23

Choose a tag to compare

3.6
  • Add explicit support for tvOS in the Cocoapods pod spec. (In fact, tvOS has been supported for a while in our code, but somehow never made it to the pod spec.) Note: not supported by the offline mode.
  • Add support for HTML documentation generation via Jazzy
  • Fix behavior of the exhaustiveFacetsCount response field when using disjunctive faceting
  • Migrate the User-Agent HTTP header to a new, more parseable format; now also includes the operating system's version.
  • Change value of ErrorDomain constant. Note: not a breaking change unless you relied on the value itself.
  • Update documentation

Offline mode

  • Expose last successful sync date (property MirroredIndex.lastSuccessfulSyncDate)

3.5

29 Jul 08:59

Choose a tag to compare

3.5
  • New multipleQueries() method at index level
  • Fix cancellation of requests: in some edge cases, the completion handler could be called after cancellation
  • Fix potential crash when cancelling requests (unsafe assertions were made)

The following changes are for the offline mode only:

  • New offline fallback strategy. Warning: breaking change: preventive search no longer supported.
  • Offline requests now also work for disjunctive faceting
  • The searchMirror() method has been renamed to searchOffline(), for better consistency with the newly introduced searchOnline() method.
  • Improve detection of non-existent indices

3.4

25 Jul 10:09

Choose a tag to compare

3.4
  • New Client.isAlive() method (/1/isalive endpoint)
  • Completion handler is now mandatory for multiple queries. Warning: breaking change
  • (#88) Fix passing of strategy parameter in multiple queries (should be POST instead of GET)
  • (#103) Fix URL encoding of path components (e.g. spaces in index names)
  • Add test case for TCP connection dropping

3.3

29 Jun 08:11

Choose a tag to compare

3.3
  • (#77) Support a list of languages as a value for the removeStopWords query parameter. Warning: The type of the
    corresponding property had to be degraded from Bool? to AnyObject?; as a consequence, the getter suffers from an
    incompatible change (but not the setter).
  • (#79) Support aroundRadius=all in query parameters
  • (#76) Support the exactOnSingleWordQuery query parameter
  • (#76) Support the alternativesAsExact query parameter
  • (#74) Support Swift 2.3
  • (#75) Fix iTunes Connect submission issue when using Carthage: minimum iOS version is now 8.0
  • Update documentation

3.2.1

27 May 09:59

Choose a tag to compare

  • Fix OS X support in Cocoapods

3.2

26 May 16:12

Choose a tag to compare

3.2
  • Support iOS 7.0
    • Warning: Because Cocoapods uses dynamic frameworks and Swift is not supported in dynamic frameworks on iOS 7,
      iOS 7 support is not possible through Cocoapods.
    • Warning: Due to unavailability of simulators earlier than iOS 8.1 in Xcode 7.3, iOS 7 remains untested.
  • README updated
  • [Test] Add test case for DNS time-out

Experimental features

  • Offline mode. Note: requires the Algolia Search Offline Core library. Warning: beta version.

3.1

09 May 08:43

Choose a tag to compare

3.1
  • Add tvOS target
  • Restore Carthage support
  • Add typed properties for query parameters filters and numericFilters
  • Shuffle host array at init time, for better load balancing
  • Update documentation
  • Fix unit tests: remove broken "keep alive" test case