How do I generate a Swift *Runtime* warning message? [duplicate] - ios

This question already has answers here:
How to log a warning that shows up as a runtime issue in Xcode?
(7 answers)
Closed 2 years ago.
I would like to add a warning that shows up like the "Main Thread Checker" in the Issue Navigator under the Runtime tab.
I have used assert() in the past but I don't want to cause a crash, just note the issues in the navigator.
I want the error to only show if the code is run and not at compile time.
Maybe the answer is that one doesn't exist?

#warning("My message")
#error("Some Error")
I use this feature frequently to mark some TODOs: #warning("TODO: Some work")

Related

Application is terminated due error on dequeuing cells [duplicate]

This question already has an answer here:
Swift performSegue going to Xcode
(1 answer)
Closed 6 years ago.
I'm a newbie in XCode and iOS development and trying to create a simple app to display a players data in table view. I can build project without any warnings or errors, but when I'm running the application the app execution stops at this place. Could someone help and explain what I'm doing wrong?
You've hit a breakpoint. Breakpoints let you pause and run through your code step by step. You can learn more about the debugger here.

What does this symbol mean on Xcode [duplicate]

This question already has an answer here:
Xcode issue navigator : What two arrows blue icon mean?
(1 answer)
Closed 6 years ago.
Suddenly, I am seeing something very strange on my Xcode.
I realize that is a static analyzer to help me know where memory leaks can happen but I want to know now how to get rid of this and without changing my code. I mean., what configuration, I can change in xCode to remove that symbol as it wasn't there just minutes ago.
It means you have 72 "static analyzer warnings". The Xcode static analyzer parses your source code and tries to find things that you wouldn't want to happen at runtime (for example never releasing some object to reclaim its memory).
You can find a lot more about it here.

Xcode 8 Console Garbage? [duplicate]

This question already has answers here:
Hide strange unwanted Xcode logs
(14 answers)
Closed 6 years ago.
Has anybody else had issues with the Xcode 8 console showing a bunch of random stuff? I don't want to have all of this cluttering my debug messages and logs. Does anybody know how to turn this off?
EDIT: The release notes specify that the console might dump unhelpful stuff for watchOS, but not for iOS.
Example:
You can disable that output with a environment variable.
In Product>>Scheme>>Edit Scheme...>>Run add the following environment variable: Name:OS_ACTIVITY_MODE, Value: disable
Originally described on Twitter here.
It seems this information is not garbage and can help with the variables view when checking system framework calls. However, this seems more related to debugging for the engineers at Apple and seems to have been logged as an xcode 8 issue. No idea when this will be resolved.
I also checked (started) the key binding with a "show" and "display" filters but none are relative to this. Below is apple's note:
• Xcode Debug Console shows extra logging from system frameworks when debugging applications in the Simulator. (27331147, 26652255).

Xcode crashed when I open the main.storyboard, no matter if it's a new project or not [duplicate]

This question already has answers here:
swift : Failed to communicate with Interface Builder
(3 answers)
Closed 7 years ago.
I've searched on google for some time and can't find the answer to this problem of mine.
When I try to open the main.storyboard of any swift project, my xcode crashes, I can access the source code and all, just not the interface builder.
I get the error which can be seen in the pastebin link:
http://pastebin.com/URgBuPkV
Well, this looks like a bug in your Xcode.
I would recommend to simply de-install and then re-install Xcode.
Hope that helps :)

suppress warning in code [duplicate]

This question already has answers here:
How do I turn specific Delphi warnings and hints off?
(5 answers)
Closed 3 years ago.
in eclipse java there are operators that help suppress warning in code.
is such suppression in delphi?
and
warning off
warning on
is two commands.
In case you haven't found it, these can very easily be controlled from the Project Options dialog:

Resources