I am currently working on an iPhone app using Xcode 11.3.1 (Swift 5) running on a Catalina virtual machine. Periodically, when I build I will get errors that Xcode can't find modules that it had no trouble finding a few minutes ago. If I close the workspace and re-open, Xcode says it's indexing. Most of the time this fixes the problem. Sometimes I have close/re-open more than once.
The modules that I've had trouble with are GoogleSignIn and iOSDropDown. I also have Firebase installed, but so far I haven't seen the error from that one.
I have deleted derived data, and deintegrated/reinstalled my cocoapods. Since I closed the workspace to do both of those the problem was fixed temporarily, but returned.
Doing a clean build (shift-cmd-K) does not fix the problem.
Does anyone know how to prevent this from happening or at least how I can force a re-index (assuming that's what fixes things temporarily) without closing the workspace?
Thanks for any help.
Maybe try: go to your podfile, then there's a line use_frameworks! make that a comment I assume this would solve your issue.
Related
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?
Using answer in apple.stackexchange.com did the trick:
Removing the ~/Library/Saved Application
State/com.apple.dt.Xcode.savedState/directory might help.
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!
rm -rf ~/Library/Developer/xcode
in terminal worked for me, based on this answer
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.
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
Go to setting
Icloud
turn off sync
Thats all enjoy
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.
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.
I am currently running 2 versions of xcode. I recently upgraded from
9.3 to 9.4.1 and also xcode 10 beta 6 on High Sierra v.10.13.6. The
simulators seem to work fine in xcode 10 beta 6 but are completely
missing from 9.4.1 I have downloaded and installed additional
simulators which show up in the simulators window list, however they
are not added to the drop downs in the main project window and the devices list remains empty. I wondered
if its simply that I have messed up something in the installation. I
have tried to remove everything and reinstall and got the same problem.
Any advice would be great. If anyone who is also running two versions could recommend
also optimum set up with installation etc. I can
post more detail as required. I have added screen shots please follow
the links.
[main nav - generic iOS device][1]
[empty devices panel][2]
[simulators panel][3]
[1]: https://i.stack.imgur.com/4qU4M.png
[2]: https://i.stack.imgur.com/SVLo0.png
[3]: https://i.stack.imgur.com/vavl1.png
I had a similar issue. If I created a new account on the same system that new account did not have the same issues. This lead me to believe it was a user preferences issue.
Some of the advice for fixing this involves deleting all Xcode files and re-installing from scratch. Try the solution below to see if it works for you since it’s much faster and less work.
Quit any running version of Xcode
Delete the folder: ~/Library/Developer/CoreSimulator
You can see from the attached screen shot there is a device_set.plist file. Deleting this file alone doesn’t help so delete the entire directory it’s inside of.
Launch Xcode
Select Preferences and go to the “Components” tab.
Download ANY new simulator
Once downloaded you should see all of your simulators showing up. It seems to be the process of downloading a new simulator rebuilds the list of installed simulators.
Note I tried downloading a new simulator w/out throwing away the above directory to see if this would rebuild the list of simulators but it did not work.
I've a project that uses Swift 4.1, Cocoapods and has some unit tests. These tests were visible on Xcode 9.3, after I updated it to Xcode 9.4 the test navigator gets stuck and even deleting the derived folder, cleaning the project, reinstalling the software and restarting the Mac does not solve this issue. Must be a misconfiguration on the project (but I didn't change anything).
Any idea what I can do?
(Image has been resized)
Managed to solve the issue:
Simply uninstall all entries of Xcode following this answer this answer and install Xcode 9.4 again.
I came across this issue with Xcode 10.2.1 and solved it by making sure all my code was checked in and pushed, then creating a new sandbox (I'm using git).
That was easier than trying to figure out what Xcode files were causing the issue.
Check if you have disabled xcode indexing. if you have delete it using the terminal command
defaults delete com.apple.dt.Xcode IDEIndexDisable
Then restart your xcode. It worked for me.
Command/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
failed with exit code 10
I am facing a strange issue. I haven't changed anything but my project is not able to build any more for some reason.
This happened as I changed from Simulator to my phone (which I do really often) after the newest iOS Update.
The below errors came up all at once.
I tried everything from cleaning the project, restarting Xcode, reinstalling/updating pods, using different simulators and reattaching the iPhone new.
Any idea?
I had a similar issue. Go to preferences -> Location -> derived data -> and the remove the derived data or give a custom location. Worked for me.
I had the similar issue suddenly, I closed everything then restart mac, then it worked
I am keep getting this error while uploading..I have no idea what this error are and how to resolve them...my build was successful(there are some warnings) my application is tested on iOS 4.1...any help is highly appreciated.
Thanks
It appears that Apple's servers may be having issues this weekend. I got a similar error. You should check iTunesConnect to see if the binary was uploaded, and perhaps send email to ITC support confirming.
I had this issue as well and was able to get around it by using Fink.
Basically, the issue was that Application Loader.app was expecting to find servlet.jar in my classpath & by not finding it, was throwing a Java error. I tried with both the iOS 4.1 version of Xcode & Application Loader.app and the iOS 4.2 versions.
Solution:
Download fink & install.
fire up Terminal.app
fink install jakarta-servletapi
quit Terminal.app & relaunch it (it should automatically update your shell)
cd /Developer/Applications/Utilities/Application Loader.app/Contents/MacOS/ (assuming you have installed the dev tools to the standard location)
./Application\ Loader
smile
This is what worked for me, hope it helps? You can probably achieve the same thing using other tools (such as DarwinPorts?), but I have chosen Fink given that's what I first picked years ago... :)
The local installation of XCode seems to be broken. Uploading the file from an other system does not show any problems.
I try to reinstall XCode and hope that fixes my problem.