So this same problem exists for a long time apparently. I checked all the xcode 4 code sense problems and used their solution and it works. Right up untill I build the file to run and then code sense stops working. I Really dont want to keep deleting the file in organizer and restarting xcode everytime. Is there a simpler method to fix this.
The first thing I always do when I lose Code Sense is to clean the project. If that doesn't work I use Watchdog to clean it. Watchdog deletes the derived data for the project like you can do in Organizer but it allows you to set up a handy keyboard shortcut which saves a ton of time now that Organizer doesn't have a keyboard shortcut.
Related
Whenever I try to change anything in my source files, the Xcode builds the entire project.
And since, I am in between writing the code, its obvious that there are errors (like "NSLog(#"ABC")") will throw an error if written halfway like this "NSL").
If I leave it idle, it fails for 5 to 10 times more and finally I see build succeeded. And again, when I try to change anything, it rebuilds on every keystroke and fails.
I have tried unchecking, "show live issues", "continue building after errors". Even a deep clean (command+shift+alt+k). After cleaning, its ok, but when I rebuild again, the same nut job building process continues.
This issue is not related to IBDesignables also. I have tried to uncheck "Automatically refresh views" in the storyboard and it did not work.
Any help?
Looks like, I can't open my storyboard as a different window, not even in a new tab. I used to have one of my windows for the source code and one for storyboard only. This made the switch between storyboard and source code much faster. But may be because of IBDesignables, its not possible anymore.
The problem is partially solved. Even if I open my storyboard now, it shows the same behavior of rebuilding again and again. But atleast, I can write my code in peace now with only source code files open in different tabs/windows.
I've searched around and can't find anything on this.
Using Swift 2 and Xcode Version 7.0.1 (7A1001). Every time I execute something in the debugger console, Xcode crashes.
The project is not very big, and has less than 10 third party frameworks.
I can't think of much more information that's relevant, but I'm sure there's more, so please do ask me if there's anything I should add to my question that would help.
I've of course cleaned build and derived data.
It's driving me insane. Thanks!
UPDATE 16/11/12
Submitted rdar://23559366.
How are you maintaining your third party frameworks? Via Carthage?
If so then this is probably your issue: https://github.com/Carthage/Carthage/issues/924
This is an issue if the location of the /Carthage/Build/iOS folder is in a different location to where it was produced (i.e if it was compiled on a different machine and the absolute file path has changed).
A temporary fix would be to run carthage build --no-use-binaries on your machine to rebuild the symbols using the current absolute file path working around the bug.
But if you wasn't using carthage then its probably not your issue so sorry
I had similar problem with Xcode whenever I hit breakpoint.
In case you see this screen right before your Xcode crashes - you are lucky and my fix might save you. All you need to do is open this window and in the Project Navigator, select any file that you want, so that instead of that white blank view you would get your code. After this you are most likely will be able to successfully stop your app at your breakpoint and perform the debug.
I am not sure why this happens, but I suspect that the reason is Debug View Hierarchy mode, which you might have triggered prior to setting you breakpoint and trying to stop at it. At least this is when it happens to me.
I have similar problem earlier.
If you try to print non-optional variable and unfortunately it holds nil value then it breaks/crash. so that make sure declare all possible variables as "Optional type".
In my simple app I have a few files that are tested by unit testing and uitesting.
I am pretty sure that in UITests I tested EVERY line in WLLoginViewController. The test passed, but it is not considered as 100% in code coverage for that file. Sometimes when I restart Xcode, run app again, clean app, hard clean app. Do some accidental things, it works. But run tests once again, and again it is not considered. Why? Any ideas how to fix it? Is it a bug?
As you already mentioned, sometimes Xcode says that you are testing 100% of your code and sometimes it doesn't. So it's really inconsistent. That is an indicator for a bug.
Since you are still using an Xcode-beta, it's most likely a bug in Xcode. I wouldn't worry to much since it's still a beta-version and would check later, when the final version is released.
Ok, I've found temporary workaround.
Remove derived data for your project (window->projects)
Quit Xcode and Simulator.
Launch Xcode with your project, and run tests.
Run tests again.
Remember to wait until indexing is finished:
Weird, but try and see:)
Xcode 6 never gets past "Loading" when I try to create a new project. I actually was able to create a new project yesterday, but I decided to just ditch it completely (deleted). Clearly there must be a bad file somewhere, possibly related to the project I deleted, since I also see the same stalling behavior now with Xcode 5.1, which has worked fine for creating new projects in the past. Xcode 6 has worked fine when starting with an already existing project and still appears to do so. I did not see this exact problem in your data base, though one person saw the project creation freeze before reaching the stage I get to. Their solution was to delete Xcode and every possible file related to it, which I'm a little squeamish about, since I don't want to affect existing projects, and don't have an understanding of what the various files are for.
Deleting the DerivedData of Xcode should fix the issue. You can do this by heading to ~/Library/Developer/XCode/DerivedData (with a Finder window open press cmd+G) and deleting all the subfolders of it.
This is embarrassing, but if it could happen to me, maybe it could happen to someone else. The problem was that the window that came up after the second step in defining the type of project to be created, the one in which you choose where to save the project's files, extended off the bottom of the screen, so that only the very tops of the buttons were visible. Eventually, I realized the one to the far right might be the one to click to continue. Which it was. Feel free to delete this question.
In the last few months we've noticed that Xcode seems to be rebuilding our project every time we 'Run', even if no files have changed. How do I determine what is causing this to happen so that I can prevent it?
We did start using Swift in the last few months as well...not sure if it's related.
Also, one reason that the problem is so noticeable is because of some extra build phases that we have which execute shell scripts that take time.
I am not sure if it's intention by Apple, or an Xcode bug. However, you can select ⌘⇧R (command+shift+R) to rerun without rebuilding.