XCode 4 errors/warnings dont jump to code when i click them - xcode

Hey this is a small issue with XCode 4 that is annoying me. When i click on warnings or compile errors on the left hand panel, I am not taken to where the error is on the code. This used to work in XCode 3.x but no more.
Anyone else seen this?

Ive found a way that works more often than not...
In the left hand panel, click on the "Show the log navigator", its the button which looks like a speech bubble. Now underneath will show the logs for every build. This is like the old Xcode, and will show errors/warnings. When you double click on the errors it will open the file to the line of the error.

I had this same problem and fixed it by switching the compiler from LLVM GCC 4.2 to LLVM Version 2.0.

Related

Swift 3.0 quick help option key

I'm a total beginner in Swift, so I always find the quick help in Swift 2.2, Xcode 7 very useful(You hold down option key and click on something and the Xcode would give you a pop-up window containing all sorts of information about the variable you are clicking on). However, after I updated to Swift 3.0 the pop-up window becomes blank and a message "No Quick help". I'm wondering if someone could tell me how to bring the quick help back, thank you!
This is an Xcode question. Quick Help only works with Swift when you don't have any errors before or in the current line you want to open the Quick Help from.
I also experienced this and it seems this feature worked much better with older Xcode versions. But I guess this has to do with Swift because it is such a fast growing programming language. The integrated interpreter of Xcode isn't able to keep up with it.
To work around it, just comment out all failing lines of code and then comment in one line by one while fixing the errors. Sometimes it is helpful to also clean up the generated project files. And if this also doesn't work, just restart Xcode.
The last step is often necessary when you're in a Playground.

Xcode assistant editor won't show some of the code

First of all, I would like you to know that the class IS set to the correct file in each ViewController - I know that because it did work before, but then I got a "crash" in Xcode that blinked quickly without me being able to read it before it went off again.
MY PROBLEM IS:
I have a lot of ViewControllers in my Xcode, everything was working fine, I was making some more features to the ViewControllers.
Then I got the "crash" as mentioned above, and it would not show any of the files/classes related to their ViewController in assistant editor.
Assistant editor just said: No Assistant Results. Then I read that I could just show the files inside my XCode project and delete project.xcworkplace and xcuserdata. And I thought it worked at first, but it did not work on every viewcontroller unfortunately - only on some of them.
Now, I still have plenty of ViewControllers left to edit that aren't working, and I would hate if I had to recreate every single one.
Does anyone have a better solution to this? I really hope you do :-)
Make sure you set Automatic not Manual.
There was some related answer but I can't find it. Anyhow: what I do to fix it is to uncheck the Target Membership in the File Inspector for the XIB and then turn it on again. That fixes the issue (in most cases) for me.
Also try restarting/clearing the different caches of XCode.
I was similarly not able to view code/classes relating to the View Controller. In my particular case, it appears i might have caused the issue- I turned OFF Indexing because Xcode was running terribly slow and around that time I started getting the issue and the message “No assistant results”.
To resolve this in my case, I turned indexing back ON and set the Assistant editor to “Automatic”.
To turn Indexing On or Off, open up the Terminal using either of the below commands-
Turn Indexing OFF:
defaults write com.apple.dt.XCode IDEIndexDisable 1
Turn Indexing ON :
defaults write com.apple.dt.XCode IDEIndexDisable 0
From accepted answer regarding Indexing: Stopping xcode from indexing
xcode 9.0
Open project.
Click on "Show the assistant editor".(top right side middle button - circle shape)
Code was show after do second step.
I cloned a project and found that I have the same problem. But all I did to fix it was to just sign the app at Signing and Capabilities and the option for the right View Controller pops up in the top bar of the Assisntant in my View

What does this icon mean in Xcode 4.5?

I have seen this icon on Xcode 4.5 whenever I run a project. I have also seen this possibly on older versions of Xcode also, though I can't remember distinctly.
What could this possibly mean?
EDIT: The image was not previously loaded, have uploaded it now
EDIT 2: I wanted to know about the number 3 which is coming in the left side of the image. I understand the "114" denotes the warnings". Apologies for the ambiguous explanation in the question before.
It means you have warnings.
In this case you have 114 compiler warnings!
Click on it and you'll be taken to the correct tab in the project explorer where you can start working on correcting them.
As for the number 3, again, click on it - it shows you the number of tasks it is running.
Just try clicking on things in Xcode, you'll find a lot more information about it that way.

Xcode 4.2 Switching File Shown in Editor

When I run my code, Xcode switches from the file I was working on to main.m in the editor. It's driving me nuts. Any ideas?
In your menu bar at the top select
Xcode --> Behaviours --> Edit Behaviours
then select Show Navigator --> Current View
and
Show Debugger --> Current Views
Do this on any category that you feel may be triggering this behaviour.
like #Robotnik said, it sounds like you are crashing out for some reason. Look at the Console of your app within XCode and see if there are any exceptions or errors being thrown there?
And if that doesn't work, set breakpoints and step through your code and see what line might be causing the app to abort.
Crashes are usually the only reason I've ever seen for XCode to "magically" browse to main.m.

Is it possible to prevent Xcode from listing build errors in a separate window?

I don't like the way Xcode displays compile errors and highlights source code in a separate floating Build Results window. It's easy to end up with 3 text editors on screen, all showing the same source code! I just want it to jump to my error in the main text editor like Visual Studio would. Is there a way around this, or is it any different in Xcode 4?
Yes, select the "All in one" layout in XCode General Preferences.
Yes, Xcode 4 is all one window, and builds constantly so errors appear almost immediately. I think you'll like it much better, especially if you're accustomed to Visual Studio (it's not the same as VS, mind you, but more similar than Xcode 3).
No way mate, I was a .net developer before I switched to mac. It's very hard to get use to Xcode and Objective C, it's not as intuitive as Visual Studio , or C sharp.
However the latest version of Xcode brings some improvements , so it doesn't show you the compiler errors in a separate window. It shows you the errors in the left side and the code in the editor. you should upgrade it's a bit more intuitive.

Resources