I am having issues with errors in Xcode. I have purposely set errors in my code just so the errors show up, but they only appear for 5 seconds then disappear. Which is making debugging extremely difficult. Is this a bug in Xcode's lates release?
As per GreyFox93's answer here:
I found that executing Xcode with Rosetta avoid that bug to occur. Maybe we loose a bit of performance but it's much more convenient to debug
In your Application folder, find Xcode, right click on it, then select "Show info". Here check the "Open with Rosetta" box. Restart Xcode if it was already opened.
Everything works great again on my side
It is a bug with Xcode 14. Just use Xcode 13.4.1.
From "boywhocodes" I used his suggestion which worked at once for me:
Cleaning Derived Data folder worked for me : Go to Xcode -> Settings -> Locations -> Derived Data -> Click on the right arrow icon Delete the Derived data folder and run again.
Related
The quick help feature is working just fine when I open an Xcode project, however when opening a file (e.g. abc.swift) that's not in an open project, the documentation does not appear.
Here is an example:
Install the version of the Command Line Tools for your Xcode
`Xcode menu -> Open developer tools -> More Developer Tools
Restart Xcode. It helped me to see Quick Help again and also fixed git crash.
The below code worked for me. Run the following command from Terminal, then relaunch Xcode.
defaults delete com.apple.dt.Xcode IDEIndexDisable
As an occasional user of XCode, what I still needed to do was download the documentation, which was not installed with the XCode install and/or did not carry over from a previous version of XCode.
From the Preferences dialog, click the Components tab, click on Documentation, and then click the download button for Guides and Sample Code.
Probably obvious for regular users of XCode, but I thought I would write it out for anyone else having this problem, since this was at the top of the Google search.
This is what worked for me. I closed Xcode and then deleted ~/Library/Caches/com.apple.dt.Xcode.
Then I reopened Xcode and checked. It worked after that. I'm currently on Xcode 10.2.1.
It's worked for me, just move the Xcode.app into Applications folder if not exist over here ;)
After updating to osx 10.9, in any of my projects doing the following crashes Xcode 4.6.3:
fold a method, if statement, for loop, etc
click on a different file
click back on the file with the folded code
When clicking back on the file I notice that all the line numbers are gone but the one at the very top (which is usually some random number and it sort of flashes a bit). Less than 5 seconds after clicking on this file XCode crashes.
This is repeatable. When I reopen Xcode and open the project, the problem persists. Now I am unable to access that file. I've tried closing Xcode and releasing the memory in RAM. I've tried removing the reference in the project and adding it back. Yes the problem persists.
This is massively frustrating and has completely derailed my development. Has anyone else had this issue? Anyone know how to solve it?
Here's the crash report if it's helpful.
-GW
Ok I figured it out, but am still curious as to why this is happening and how I can still fold my code without this problem.
click on the problem file.
click anywhere where the code should be (sometimes all the code appears to be gone)
goto Editor > Code Folding > Unfold All
That cleared it up.
It happened to me too. I fully share frustration and reasons why not going to rev 5.
Here's my solution :
exit xcode
go to your myProject.xcodeproj file
look inside the package for myProject.xcworkspace file (right click / Show Content)
back up myProject.xcworkspace outside your xcode hierarchy
delete myProject.xcworkspace file
restart xcode (a clean myProject.xcworkspace will be created).
NOTE: Works for me, but I'm not using workspaces. I have not tried, but I suppose that if you want to preserve your workspace settings you'd have to selectively delete the UserInterfaceState.xcuserstate files further down in the package hierarchy?
I had to delete UserInterfaceState.xcuserstate file to solve these reoccurring code/comments folding crashes in Xcode 4.6.3 running on OSX 10.9.
This file can be found at projName.xcodeproj(Show Package Contents)->project.xcworkspace(Show Package Contents)->xcuserdata->username.xcuserdatad->UserInterfaceState.xcuserstate
Note that you will loose all the saved user state info of your project, which means all your open tabs will disappear, folded code will be unfolded etc. And the crashes may start reoccuring if you fold any code or comment again.
My project builds with a warning, but it is not displayed in the "Issue Navigator". How can I get to this warning so I can resolve it? I've tried clicking on the warning on the top of the window but that does nothing. I'm using Xcode 4.3.
I met the same problem, and I found it simply because there are some thing wrong with the below filter input.
You can solve the problem by typing something in the below filter input and then clear it.
Building on Yingpei Zeng's answer, the buttons on the bottom right of the 'grey' panel with the 'No Filter Results' message act as toggle switches to apply or remove filters. They are the buttons in this figure here on the bottom left (the clock and the two to the right of it):
Unfortunately, the buttons do not change much when toggled so you may miss that one has been accidentally hit...
I had the same issue and for me it helped to go to Xcode->Preferences->Locations and delete everything in folders of Derived data, Snapshots, Archives. Clean project, build, and warnings and errors was back in Issue navigator.
I had the same issue with my test project. And no solution mentioned above works. Finally I figured it out because the target project I selected is not the "Test" project. I was running test of each individual test. And the scheme I selected at that time is non-test project scheme. After I select the scheme for Tests, then the error in test project shows.
I fixed this by going into Xcode -> Preferences -> Locations and changing the location of derived data to Default. (Not sure how it became undefaulted)
Similar to Kirby Todd for me it worked to clear the contents of the derived data folder (you can find the path as Kirby said by going to Xcode -> Preferences -> Locations)
Sadly for me, in XCode 7.2 the correct answer was to quit XCode and restart it. Ugh.
I've loaded a project in Xcode 4 after not looking at it for a while. Xcode shows its progress bar and indicates in text that the project is loading, and it appears to finish, but then there are no files shown in the hierarchy or flat views. There is nothing showing in any view (except for one breakpoint in the breakpoints view).
Any ideas? Xcode gives me zero indication that anything is wrong, it shows me nothing.
I just had the same issue. After a few hours scratching my head and trying all kind of things, I finally found a fix: remove the whole package 'project.xcworkspace' inside the XXXXX.xcodeproj package.
More specifically, when you find the 'XXXXX.xcodeproj' file, right-click it, and select 'Show Package Contents'. This will get you inside the package where you will find the 'package.xcworkspace' file. It is best to do this while the Xcode project is closed.
Maybe that will work for you or for others with the same issue in the future...
Some of the project views have the "Recently Changed" filter icon. For me the problem was: i had that enabled in the Project Navigator, so it was only showing the files i recently changed. It looks like this.
I'm using Xcode 6.1 though.
I had a similar issue. After archiving a project the files would disappear from the project navigator.
It turned out that somehow XCode had added the word "main" to the searchbar below the project navigator so that almost all files where invisible. Quite frustrating.
It might be the same case for you..
For those who make it here, I was opening a older version of a similar iOS project after upgrading to the latest XCode (6.2), and was seeing the symptoms labeled in this question (missing files, folders etc.)
My solution: at the bottom left of the screen, unselecting 'Show only files with source-control status" which happened to be set on (it's blue when on). The icon looks like a 4-pt star inside a square.
remove the whole package 'project.xcworkspace' inside the XXXXX.xcodeproj package. may cause to any other error so please ignore and trying finally
You can quit xcode and reload again your project it help you
This happened to me when I tried to do an alt-tab, on a VM running in TeamViewer in Windows - Click the search bar below, enter delete multiple times and the invisible search term cleared up
I had the same issue. Besides the answers above, it could also be that you have already accidentally opened the project in another Xcode window... Close that and reopen everything and it should work.
I recently upgraded to Xcode 4.0.1 from the last version of Xcode 3x (not sure which). Install went fine and I can open and view all my old .xcodeproj files without problems. All except one!
The error I get inside Xcode is
"The file "GCSCalculator.xcodeproj" couldn't be opened because you don't have permission to view it. To view or change permissions, select the item in the Finder and choose File > Get info."
Obviously I've checked that and the permissions are exactly the same for all files as the ones in the projects that do open in Xcode. I changed permissions for everyone to ReadWrite just in case, to no avail. I feel I've tried everything obvious and can't seem to find anybody else with the same problem.
Anyone got any ideas about a fix or workaround? Typically it was one of the only projects that was actually completed so its very frustrating!
Thanks.
I ran into the same problem and found that clicking on the project in xcode and then switching the view to standard editor view will let you change all of the project settings. After editing the summary, info, and build settings areas it started working
Click to project-> Build Settings -> Compiler for C/C++/Objective-C -> Default Compiler. Hope it useful :D