algolia / algoliasearch-client-swift

⚑️ A fully-featured and blazing-fast Swift API client to interact with Algolia.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sortedKeys is only available on iOS 11.0 or newer

MattCheetham opened this issue Β· comments

Describe the bug πŸ›
We have been using the AlgoliaSearchClient framework in our app for some time, until recently we were running 8.6.0 just fine. We pulled updated versions and ran into a compile error. Assuming it was fixed in a new version, I've now pointed to 8.8.0 and still have the same error.

We can no longer compile our project due to an error on line 17 of Data+JSONString.swift inside AlgoliaSearchClient which throws the error "sortedKeys" is only available in iOS 11.0 or newer

I cannot understand why that error would be showing when that line is already inside an availability check.

To Reproduce πŸ”
Steps to reproduce the behavior:

  1. Create a new Xcode project with iOS target
  2. Add this SDK to your project with SPM at version 8.8.0 up to next major version
  3. Import AlgoliaSearchClient in ViewController.swift
  4. Attempt to build the project
  5. Project fails due to framework being unable to compile

Expected behavior πŸ’­
The framework should compile

Screenshots πŸ–₯
Screenshot 2021-03-02 at 11 02 51

Environment:
Xcode 12.4 (12D4e) compiling to iPhone 12 mini simulator with deployment target of iOS 14.4

Additional context
This happens in both our existing project and a new blank project

Hi @MattCheetham,
Could you try to re-add the package after clearing SPM caches? The tag was resubmitted manually yesterday and now this issue shouldn't occur.

Thanks @VladislavFitz. I cleared my caches this morning and pointed at 8.8.1 which compiles now with no issues. πŸ‘