5

Since I have updated to XCode 7.3.1, I'm not able to run my project because it hangs on the "Copying Swift standard libraries" step (both from IDE and command line). It also crashes if I try to open the project configuration file or if I create a new Swift project.

Does anyone have idea why this is happening?

I'm running XCode on Mac mini (late 2012) with OSX 10.11.6


SOLVED
Finally solved reinstalling XCode and SDK.
Thank you all for the answers.

Bishop
  • 59
  • 1
  • 5
  • I would try to reinstall Xcode and SDK. At least try to restart all you can, clean project, clean build folder... – pedrouan Aug 22 '16 at 16:19
  • Bit of a cliche, but have you tried a clean (command, shift, K) and also quitting and reopening xcode. You'd be surprised how often this solves my problems! – Reece Kenney Aug 22 '16 at 16:20

3 Answers3

12
  1. Open Keychain Access
  2. You may find a LOT of appleid certificates (1000+ of them)
  3. Delete all of those appleid certificates.

Problem solved.

Matt Channon
  • 119
  • 1
  • 5
  • 1
    This worked for me. No need to trash the whole keychain just deleted anything with appleid in it. didn't need to restart xcode even. – worthwords Nov 09 '16 at 00:13
  • This works! on xcode 8.3 Swift 3.1. I tried everything else too. Even - SWIFT_WHOLE_MODULE_OPTIMIZATION = YES - didn't work till I tried the above. – uplearned.com Mar 30 '17 at 00:53
  • Still observed in Xcode 10.2.1. I didn't have so many of them (I had something like 30) however it still did the trick! – Soberman Jul 17 '19 at 12:19
2

I had this problem on Xcode Version 8.0 (8A218a) and OSX Sierra 10.12.1.

It turned out that Keychain access had been messed up with the OSX upgrade. For some reason Xcode was not surfacing the problem and was happily building but hanging on the "Copying Swift standard libraries..." leading me to do the usual fixes detailed here

In the end what fixed it was resetting the Keychain (a pain I know!) and re-creating the developer certificates. There may be a better way which is less destructive but this is how I solved it.

Community
  • 1
  • 1
Brendan
  • 18,771
  • 17
  • 83
  • 114
  • I am having this problem now. How do I reset Keychain Access and recreate developer certificates? – Alejandro Oct 28 '16 at 06:49
  • 1
    For anyone else wondering, on Keychain Access go to Preferences and select the option to "Reset My Default Keychain". After that, remove your developer account from Xcode preferences and then add it again to recreate your certificates. – Alejandro Oct 28 '16 at 11:57
0

open x-code -> window -> projects -> Derived Data click on the arrow there you will get the path of all your derived data., now first force quit your x-code and then delete this derived data folder found.. now reopen xcode n clean and try to build hope it works... Kudos

Er. Khatri
  • 1,384
  • 11
  • 29