What does the gray exclamation mark means in Xcode 8.3? - objective-c

I updated the Xcode to 8.3 version today, but I found a new error message, a gray exclamation mark. I do not know what it means, But the program can run normally. Does anyone know what this symbol means?

That error style is not new to Xcode 8.3, but your project may be experiencing new warnings or errors due to changes in Xcode 8.3 which is causing this style to appear.
That style is used to provide you with additional information about a given error or warning. You should see the primary issue somewhere above the grey exclamation mark style. There should also be a disclosure triangle that will let you collapse this additional information.
You need to resolve the primary issue.

Related

AppCode won't highlight errors

I'm trying out AppCode for a simple Swift iOS application, and the first thing I noticed is it won't highlight any error whatsoever. The build fails with simple errors like use of unresolved identifier 'param', but it won't highlight to let me know said variable doesn't exist. Moreover, the the file analysis (little green checkmark at top-right corner) says No problem found.
I'm using AppCode 2016.1
Do I have to make some kind of extra configuration or similar?
Showing warnings and errors in editor is not yet implemented in AppCode 2016.1 for Swift. This feature is ready in AppCode 2016.2 Early Access Preview. Download it here and in case you interested in updates - read about it in our blog

Resharper: how to suppress warning "Field xy is never used" in XAML

I want to suppress a warning in my xaml file. I applied the corresponding quick fix option to "Disable once warning by comment". However, the warning
is still active. How do I correctly suppress the warning? I would like to keep the name because it tells something about the purpose of the element. (An alternative would be to remove the name and use a comment.)
Edit
The issue is only valid vor Resharper version Build 8.2.0.2160.
After updating to 8.2.3 the suppression works correctly. (And in version 9 the warning does not seem to be active by default.) Thanks to citizenmatt.
The issue is still shown in the Inspection Results view, see related question Resharper: How to hide suppressed warnings in Inspection Results?
In this special case it makes more sense to use the Tag attribute (thanks to Mike Eason) or to use a comment to write the name instead of using a comment to suppress the warning.
This looks like an issue with an older version of ReSharper. You can update to the latest version of 8.x (8.2.3) or ReSharper 9 (the 9.2 EAP has just released EAP3). It appears to have fixed the issue.

Upgrading to Xcode 5.0 introduced hundreds of the same warnings "Letter Spacing Adjustment on iOS versions prior to 6.0"

I have a project previously in Xcode 4.0. It runs without any warnings or errors. I just moved it to the Xcode 5.0. After getting rid of tons of errors, I'm now left with hundreds of the same warning:
"Attribute Unavailable. Letter Spacing Adjustment on iOS versions prior to 6.0."
The warning appears all in my xib files.
Anyone has any idea of what causes the warning and how I can get rid of them?
Thanks in advance!
Worked out a solution.
Attributes inspector -> uncheck Tighten Letter Spacing under Autoshrink. Re-run. The warnings should be gone.

Disable IntelliJ Warnings

It really annoys me that IntelliJ highlights certain 'errors' (that don't prevent successful compilation) the same way that real errors are highlighted. For example, a magic number is not really an error, but it will be flagged in exactly the same way as an incompatible type error.
How can I change this?
Go to Settings -> Inspections. Then you need to search through the long list for the offending inspection, which you can get the name of by hovering on the warning marker in the margin. You can change the severity of the inspection, whether it's an error, warning, etc. or just disable it altogether.
Edit: if you search for "magic" in Settings, you get the following, which should be helpful:
Whenever you see an inspection warning/error you can place the caret on it and press Alt+Enter (a light bulb also appears that tells you that). A menu will appear with suggested quick fixes. You may need to open a submenu by pressing Right, and you'll find "Edit inspection settings" there. Having invoked that, you may proceed as in hvgotcodes's answer :), it's just a faster way of getting to those settings.
As Michael Calvin said you can use the SuppressWarnings annotation. For example:
#SuppressWarnings("OptionalUsedAsFieldOrParameterType")
See https://github.com/JetBrains/intellij-community/blob/master/plugins/InspectionGadgets/src/inspectionDescriptions/OptionalUsedAsFieldOrParameterType.html
Usually searching the internet for the exact description leads me to this.
Not directly relevant to the OP, but may be of use to future Googlers
I got to this question while trying to figure out how to disable IntelliJ IDEA's warnings about Guava functionalities that have been replaced by Java 8 features. I'm not able to use the Java 8 versions of these features in my case because of a library we're using that was built with Guava (despite being a Java 8 project). So to solve that, I added a SuppressWarnings annotation before any class using Guava:
#SuppressWarnings(Guava)
public final class...

XCode Syntax Coloring Broken

XCode frequently seems to lose it's mind, and doesn't color code system classes or provide correct "code sense" suggestions. This is endlessly frustrating. The question has been asked on at least three other occasions:
Problems with Xcode Syntax Highlighting
xcode code sense color/completion not working
Xcode: code loses syntax coloring
I have switched by project version to/from 3.1-compatiable and 3.2-compatiable, completely restarting XCode before and after each change with no effect.
I have rebuilt the code sense indexes and completely restarted XCode with no change.
I have built my project to make sure there are no errors and restarted.
I have copied my files (sans .svn files) to a different location - same problem.
I've already completely disabled the argument "placeholders" because they screw up my documents when i type too fast... all I'm asking for is for the "esc" key to display the correct list of properties and methods.
You should clean your project's derived data. They are likely corrupted.
Go to Organizer > Projects > Your_Project > Derived Data > Delete
Xcode will reindex your project and you should be back to normal.
For anyone interested; my app has some precompile directives:
#if ...
Turns out there was an error in one of these sections.
I'm assuming my app built fine because these sections were stripped out before they ever got to the compiler... but CodeSense doesn't care about these (it still wants to color code everything inside these) - so CodeSense would puke all over the place because of the error, even though I didn't find it when I tried to build the app.
Once I fixed the error within that block of code, my coloring returned.
Would be nice if XCode just greyed out those sections instead of dying.