Swift Package Manager failed extracting

Viewed 656

I'm getting this Package Manager error, when switching to a different branch or cloning the project. Build fails and "Clean Build Folder" doesn't help.

Error:

failed extracting 'https://releases.amplify.aws/aws-sdk-ios/AWSConnect-2.26.6.zip' which is required by binary target 'AWSConnect': .../Library/Developer/Xcode/DerivedData/MyApp-cbgtlihuudupsqdzyjdbyvcwkilh/SourcePackages/artifacts/extract/AWSConnect is not a directory

1 Answers

The following steps resolve the issue forcing all packages to download.

  1. Product > Clean Build Folder
  2. Delete DerivedData content (Preferences > Locations > Derived Data little arrow)
  3. File > Packages > Reset Package Cache
  4. Build

The Reset Package Cache step is the most important here. It forces all packages to download as if they where just added.

Related