6

I have a source code of a swift application which developed for iOS using swift 3.

I want to run it inside Xcode however it remains in loading state forever. I have tried solutions provided in question Xcode freezes on startup while loading project however the situation did not change.

The developer of this source code told me that he used Xcode 9.x to develop application so he suggested me to try a 9.x version of Xcode. I guess Xcode should be backward compatible however I want to know does using Xcode 9.x changes the situation or I should look for reason somewhere else?

Kaushik Makwana
  • 1,311
  • 2
  • 12
  • 24
VSB
  • 8,918
  • 12
  • 64
  • 128

4 Answers4

18

Using answer in apple.stackexchange.com did the trick:

Removing the ~/Library/Saved Application State/com.apple.dt.Xcode.savedState/directory might help.

VSB
  • 8,918
  • 12
  • 64
  • 128
8

I tried all the solutions outlined here and none of them worked. However, I managed to fix this issue and here is what worked for me: If you're on an Apple OS and have iCloud sync enabled on your desktop/documents/any folder where you're loading Xcode from, the iCloud sync could be causing this issue.

I installed a fresh copy of my RN project in a directory not synced by iCloud and subsequently the issue was resolved; my build-time was down to a couple of seconds!

Frosty619
  • 1,217
  • 2
  • 19
  • 30
  • this worrked for me as well but is there a Long term solution for this. I would like to keep my projects synced to iCloud – Chetan Kumar Feb 11 '22 at 07:46
7
rm -rf ~/Library/Developer/xcode

in terminal worked for me, based on this answer

nja
  • 290
  • 5
  • 11
0

I tried to delete:

~/Library/Developer/Caches/com.apple.dt.Xcode
~/Library/Developer/Xcode/DerivedData
~/Library/Developer/Saved Application State/com.apple.dt.Xcode.savedState
~/workspace/MyProject.xcodeproj/project.xcworkspace/xcuserdata

and once it helped. But another time it didn't help, so I also tried to reinstall Xcode, which also didn't help.

It turned out that the problem was that I was installing the app via WiFi or Bluetooth. When I connected my device via cable, the Xcode popped up to life and the "loading forever" stopped.

koleS
  • 1,688
  • 6
  • 28
  • 43