xcode continues project loading forever

14.7k views Asked by At

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?

7

There are 7 answers

0
VSB On BEST ANSWER

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

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

2
Frosty619 On

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!

2
nja On
rm -rf ~/Library/Developer/xcode

in terminal worked for me, based on this answer

0
koleS On

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.

1
Alex Chalakov On

As of July, 2022, nothing else worked for me but, taking my project outside of the iCloud Drive and putting it into a directory without it. As it is mentioned above, iCloud sync interferes with the XCode running and stalls it.

0
Kamal Bunkar On

My xcode got hang when I force quit it. After that it was showing only "loading". Here is fix to start xcode from beginning.

cd /  
cd Applications
cd Xcode.app
cd Contents/MacOS
sudo ./Xcode

it will open xcode default window to open a new project.

1
Kanishka Sahu On

I wasted almost 2 hrs and tried everything on stack over flow

SIMPLE SOLUTION

Just turn OFF icloud from your mac os so that it it will not sync the project.

To turn off icloud

  1. Go to setting
  2. Icloud
  3. turn off sync

Thats all enjoy