Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 13.2 - Adding package hangs on "Preparing to validate"

Tags:

xcode

swift

I have recently updated to Xcode 13.2 from the Mac App Store. While trying to fix an issue with a Swift package, I uninstalled it and now I cannot reinstall the package.

When I try to add a package from GitHub the process hangs immediately on "Preparing to validate".

I already attempted to restart Xcode, restart my mac, clean derived data, reset Swift package caches and update package versions to no avail.

Is there any way around this issue?Screenshot of issue

like image 486
aryanm Avatar asked Dec 14 '21 01:12

aryanm


3 Answers

Check https://developer.apple.com/forums/thread/696504 and re-download Xcode 13.2 directly from the releases section of the Apple Developer website: https://developer.apple.com/download/release/

like image 82
mikeyh Avatar answered Oct 10 '22 21:10

mikeyh


Make sure to update Xcode to 13.2.1

They have just released the update that should fix it. See in the link that @mikeyh posted in the other answer: https://developer.apple.com/forums/thread/696504.

like image 4
David Novák Avatar answered Oct 10 '22 20:10

David Novák


I'm on Xcode 13.4.1 and ran into this same problem when trying to convert my project from CocoaPods to SPM packages because I was using the Legacy Build Location setting. When trying to install any package it would immediately hang on "Preparing to validate..." just like in the screenshot of the question.

I did get an error stating something like the package could not be added because of using the Legacy Build Location setting, however I did not notice this in the Issue Navigator for a while because once I removed all of my CocoaPods and before I could add the SPM packages I was getting hundreds of build errors.

To fix (if your project can use the default Build Location setting) is to set it by going to
File->Project Settings...->Advanced...->Xcode Default

Advanced project settings

like image 2
BigHeadCreations Avatar answered Oct 10 '22 19:10

BigHeadCreations