Is AlgoliaSearch-Client-Swift deprecated or just a dead-end, or is it some config issue?

I’ve been using AlgoliaSearch-Client-Swift (via CocoaPods) for about 2 years in my app. Today, I changed the platform iOS version in my podfile to (10.0) then I updated my pods. This downloaded a dozen newer pods for a dozen other libraries I am using, but it did not update AlgoliaSearch-Client-Swift. Next I try to build and get this error:
… Pods/AlgoliaSearch-Client-Swift/Sources/AlgoliaSearch-Client/Cache.swift:56:56: ‘default’ has been renamed to ‘RunLoopMode.defaultRunLoopMode’

I don’t know a whole lot about Swift, I use the library via a Obj-C wrapper which I wrote. But it sounds to me like this is an issue about Swift versions, like the AlgoliaSearch-Client/Cache class is using out of date Swift code.

I am also seeing a warning saying Swift Mode 3 has been deprecated, but, I saw that before I changed my CocoaPod iOS target to 10.0 also, and there was no compiler error. Somehow updating my CocoaPods seems to have forced the Swift code to require 4.x maybe? I am guessing here.

Please advise!

Thank you.

Hello @jordanb,

We definitely didn’t deprecated the Swift client, you can check all the releases here: https://github.com/algolia/algoliasearch-client-swift/releases

How did you defined the swift client in your pod file? We changed the naming a couple of months ago, maybe that’s why you didn’t see any updates: pod 'InstantSearchClient', '~> 6.0'

Tell me if this works for you,

Best

1 Like

Ok, it was all my fault. When I ran the convert from Swift 3 to swift 4.2 I didn’t notice it failed, everything was messed up. I reverted to my last good branch and re-ran the swift conversion. After that, I re-updated the CocoaPods (and switched to InstantClientSearch) - and now all is well again. Sorry for the false alarm.

PS. If developers are supposed to stop using AlgoliaClient-Search-Swift in favor of using InstantSearchClient, doesn’t that mean AlgoliaClient-Search-Swift has been “deprecated”?

Hi @jordanb,

Indeed, we should be more explicit about it. We didn’t change anything except the name to be more consistent.