Xcode: How to temporarily hide yellow warnings from Issue Navigator - ios

I'm working on a project (written by another developer...) with LOTS of yellow warnings.
During the build process, if there is a critical (red) error, the error keeps moving down beyond the bottom of the left pane, and it's always taking me some time until I can finally point the mouse at it and look at the error.
Is there a way of showing only the red (critical) errors?

Toggle the "!" button (Show only errors) at the bottom right corner of the Issues Navigator to hide Warnings (next to the results filter).

Go to the Project -> Your Project -> Search 'Warning'.
Then turn off warnings you don't want.

Xcode 11.7,
handle Apple Clang Warning Policies
image is more vivid.

Related

Thread1: Breakpoint 1.4 [duplicate]

I am following the Stanford University iOS development course on iTunes U.
In one of the demos (that I have been trying to follow), there is this code that loads the property list from an NSURL and returns it as NSMutableDictionary.
-(NSMutableDictionary *) words
{
NSURL *wordsURL=[NSURL URLWithString:#"http://cs193p.stanford.edu/vocabwords.txt"];
words=[[NSMutableDictionary dictionaryWithContentsOfURL:wordsURL] retain];
return words;
}
The application is successfully built, but at runtime it gives the following error and gets stuck:
I can't figure out what the problem is. Can you please help?
You're stopped at a breakpoint. That's a debugging tool, not an error. See the blue arrow/tab in the left margin, where the line numbers are? Drag that away and drop it anywhere (you'll see a "poof") to remove it, then run your project again.
You can also deactivate all breakpoints by typing ⌘-Y, the key equivalent for the menu item Debug>Deactivate Breakpoints, or you can view all your breakpoints in the Breakpoint Navigator (hit ⌘-6).
When execution stops like this, you can continue from the breakpoint, either by typing continue at the debugger prompt in the Console:
(lldb) continue
Or hitting the "Play" button in the debugger controls. You can also type Control-⌘-Y, which is the equivalent for the menu item Debug>Continue.
This isn't an error. You just set a breakpoint (probably without knowing it).
Drag the little blue Chevron in the column at the left out of the way. You will see it disappear and go poof, and then you can rebuild your app and you should see it run properly.
Now, that said, I think there are some memory management mistakes in your code, but we can return to those later. ;-)
The program is stopping because you have a breakpoint.. That's the blue arrow on the left of the code. Right-click it and delete.

Xcode 8 MainStoryboard showing blue rectangles instead of objects

I have latest version of Xcode 8 official release, and Im seeing blue rectangles borders filled white, instead of normal objects(Labels, Images, etc) on the main storyboard, I Drag an Image, button or anything and it just shows a blue rectangle (I don't see the object inside the rectangle, just an empty blue bordered rectangle), I attach an image for you guys to see, Any clue on how to solve it? Someone else with the same issue? This is happening an all My projects, and just start happening suddenly.. since the first day I was having no issue with this Xcode version.
Solution: Try these three steps.
Editor -> Canvas -> Turn OFF bounds rectangle.
Editor -> Canvas -> Turn ON bounds rectangle.
Editor -> Canvas -> Turn OFF bounds rectangle.
You may have accidentally switched on Layout Rectangles within Editor -> Canvas in Xcode menu.
The contents of my storyboard views were actually not showing AND had blue rectangles, while 'Show Layout Rectangles' was NOT on. I was also surprised to see 'Show Bounds Rectangles' since I never turned them on (awesome Xcode ghost move here)
Note: Even though I did try turning 'Show Bounds Rectangles' off, the blue rectangles remained.
Solution: Restarting the computer. Opened to my storyboard and at least for me, I had to turn off 'Show Bounds Rectangles' because it still remained. I can see my content again, yay!
(seeing on Xcode 8.0)
I tried lots of solution. But there is no permanent fix for this.
Try below line
Editor->Canvas->Bounds Rectangles. (Do this three times.)
Doing this every time is quite annoying. So a solution is u can set some shortcut key (Keybinding).
Go in Xcode-> Settings/Preferences -> Keybinding -> search Bounds Rectangles and set shortcut for that
It will be easy if we use shortcut and save some time.

Quick way to fix Xcode warnings

I've been switching between versions of Swift in Xcode 6 and my project now has 220 warnings. Mostly minor code suggestions.
Is there an easy way in Xcode to run through all the warnings and use the "Fix-it" tool to auto correct it?
I would like to review each warning, then click a button to fix the warning, and then skip to next warning. Otherwise it's going to take me a few hours to manually get through each warning.
Your best bet is to use keyboard shortcuts. The default keyboard shortcut for Navigate > Jump to Next Issue is ⌘' (command-single-quote). If you press it, Xcode will jump to the next issue it knows about. If that issue has a Fix-it available, the Fix-it popover will appear automatically and you can press return to execute the Fix-it, or press ⌘' to leave the code unchanged and go to the next issue, or press escape to leave the code unchanged and stay on that issue.
You can also open the Issue Navigator (default shortcut: ⌘4). Then you can click on issues one-by-one. If you click on an issue with a Fix-it, Xcode will show the Fix-it popover and you can press return to execute the Fix-it.
Previous answer is best solution,before doing it you must Fix Validate project Settings (Update to recommended Settings).Suppose you decided to fix it last,it may again arises some new warnings.
control - option - command - f
⌃ ⌥ ⌘ f
Just type
⌘ Enter
afterward to adjust back to normal screens view.

Autolayout yellow warnings. Will it crash my app in run time

In storyboard , I am seeing a lot of yellow warning. Upon clicking the yellow warning , I get like update frame or update constraints. In the console it throws auto-layout warnings too. I just want to know whether it will crash my app because of this.enter image description here
Yellow warnings and auto-layout warnings in console are not related.
Yellow warnings means that what you see in IB is not what you will get at runtime according to current constraints. If you want to see what you will get you should click yellow warning and press "update frame". If you want to get at runtime what you currently see in IB you should press yellow warning and select "update constraint".
Runtime warnings in console means some constraints conflict at runtime. You should analyse the warning message to find what is the issue.
Most of the time it will not. But I suggest you to fix them all.
why not update all the frames, the difference Xcode complains about is not much, and NO it wont crash your application, BUT Xcode complains as there might be situations where your constraints wont work as per you set them.
Your Application will not crash weather it is a Yellow one or a Red one .
Xcode only means that the constrains you have kept may not work properly in different modes and resolutions .
You can simply fix it by simply clicking on update constraints,but result may not be what you expected.
So click on yellow arrow and read suggestion by xcode.

XCode App randomly crashing - message sent to deallocated instance

I am getting the following error on my app when it randomly crashes during testing.
The logs show the following:
Is there any way possible I can track why this error is apprearing? I'll be super grateful.
Best.
Go to the Breakpoint Navigator. Click the plus sign on the bottom left. Add exception breakpoint. It will break right before the weird error you are seeing :)
You know the pane on the left that shows your files? At the top of it there are 7 buttons or so, and one is shaped like a breakpoint. That's the navigator.

Resources