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.
Related
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")
This question already has answers here:
Xcode keeps building storyboard after each keystroke
(2 answers)
Closed 5 years ago.
I'm using both Xcode 8.2.1 and when I write anything, even a single space, Xcode builds automatically the entire project, It's very annoying and make my Mac really slow I disabled "Live build" option in General setting, C language to compiler default in build phase but nothing changes. Any one know about it?
You need to disable "Automatically Refresh Views" from the Editor section.
It is happening because, as soon as you type anything, XCode refreshes the views as they might change due to any changes in code.
Follow this link Xcode keeps building storyboard after each keystroke
Did you try to disable Show Live Issues in Preference -> General already?
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).
This question already has answers here:
SourceKitService Terminated
(34 answers)
Closed 8 years ago.
I have seen other questions with a similar problem but mine looks a bit more serious. Xcode keeps crashing on me. I have no chance to even edit a single character in my code. It is a very simple playground file with some basic code, nothing fancy. I'm not able to do anything at all in the current state.
When Xcode crashes, I hit reopen and the same thing happens again.
Locate the playground file using the Finder, then right click and select 'Show Package Content'. Next select the swift file, right click and open it using your favorite text editor (which must not be Xcode :)).
Once there, either delete its content or surround your code with comments. In the latter case, you can reopen the playground file in Xcode and selectively uncomment code line by line to know which line(s) cause Xcode to crash.
I've verified that there some recurrent patterns in code that almost always makes Xcode to crash, for example, when I use 2 or more custom operators in the same statement. I don't know if it that happens for all custom operators, or it's my specific implementation - either case, I know that I have to avoid that combination. You should take note when you notice a particular combination of code regularly making Xcode crash, and try to avoid it by splitting into multiply lines when possible.
Here's what I did to resolve it. I did reinstall Xcode a couple of times. It looks stable now but I'm not sure till when it would remain so. Looks like a bug to me. I will file it with Apple
This question already has answers here:
How to change variables value while debugging with LLDB in Xcode?
(4 answers)
Closed 9 years ago.
When working with iOS, I sometimes have values I need to test with. I may adjust these values 30 times, and have to rebuild/rerun 30 times to test them. This is an obvious hassle.
So I was wondering (using the iOS SDK) if it was possible to tweak small parameters/data at the app's runtime? Just to make life convenient.
Set a BreakPoint
In lldb debug area type:
Example 1:
expr (void)[aView setBackgroundColor:(UIColor*)[UIColor redColor]]
Here, aView is an UIView for which I want to see its frame at runtime. I am calling the setBackgroundColor method of an UIView at runtime. Any method could be called like that.
Example 2:
expr nsstringVariable = #"yourRunTimeValue"
Here, I am changing a string variable at run time.
For more help on expr type
help expr
I highly recommend people to read this tutorial by Brian Moakley Intermediate Debugging with Xcode 4.5
Yes, with Injection for Xcode:
Using Injection it is possible to make a change to the implementation
of an Objective-C class and have it take effect as soon as the class
is saved without having to restart the application. This feature works
for OS X and iOS applications in the simulator and on iOS devices.