Xcode keep debug area closed - ios

Everytime I run my app in a simulator debug area opens with console. I'm not really like it, because its only spam in there. I want to see this only if errors, or if i open it by myself. I checked preferences of Xcode and tried to google it, but I didnt found anything.

Xcode prefs --> Behaviors.
Find the checked entries under "Running".
One of the behaviors will read something like "Show debugger with Current Views". Un-check those behaviors, or change "show" to one of the other options.

Related

Xcode 9, where are my NSLog()s going? Not showing in Xcode console or Console.app

I'm trying to do some basic logging while I work on an app. I tossed some NSLog()s into my code, but nothing is being printed to the Xcode console below. Literally nothing, not even some startup info as the app launches, etc.
I've got my Xcode console set to display All Output and I've got the variable inspector and the Console open:
I heard about Logging changes and that a new Console.app was introduced that would let me view the logs on the simulators as well, so I thought maybe the logs would show up over there, but while I do so lots of system messages happening I don't see the NSLog()s that I'm making.
Am I missing something? Is there a new setting I need to flip? Where can I see my NSLog()s?
EDIT:
I was doing this with an iOS 11 simulator and got no console output. When I switched to an iOS 9 simulator then I got all of the console output.
Figured it out. It's not an intermittent issue or one that can just be fixed with a restart. It's a Run configuration issue.
Click on the Run Scheme selector in the top left of Xcode's toolar.
Click Manage Schemes.
Click on your main App Project.
Click the Edit button in the bottom left.
Uncheck OS_ACTIVITY_MODE.
Click Close.
Viola. All your console logs come back.

Nothing in Xcode Debugger after Archiving for release

I recently archived and uploaded my app for release for the first time. However, now when I try to print to the debugger, nothing is appearing. Also, breakpoints are not being activated when I run the simulator.
I am using Xcode 7.3, the latest at the time of this writing. My app contains a keyboard extension. Neither are printing to the debugger or triggering breakpoints. The debugger pane is set to show "All Output".
As far as I can tell, it is still using the "Debug" scheme, I never manually changed it. Would it have changed when I archived and uploaded the .ipa to iTunes Connect? What would have changed?
With your suggestion, can you be thorough in your suggestion? I may not have enough experience with Xcode to understand immediately, so the more explanation the better.
Look at the "Run Scheme" for your Project (Product->Scheme->Edit Scheme or option-click on the Run button) and check the Build Configuration pulldown. Make sure that's Debug, not Release.
BTW, you can also tell what binary is actually getting run by running in the debugger, hit the Pause button, then in the Debugger Console, type:
(lldb) image list <AppName>
That will show the path to the binary that got loaded. If this is the Release version that should show up in the path and you'll know you are debugging the wrong configuration...
In archiving my app, Xcode combined the scheme of the Containing App and the Keyboard extension. As a result, the Containing App was the only selection possible when choosing a scheme and the output of the Keyboard Extension was no longer sent to the debugger.
In order to solve this, I selected "Product > Scheme > New Scheme..." and then selected my Keyboard Extension to be its own Scheme again. Once the Keyboard Extension was a scheme again, it was able to be selected as the target scheme to send output to the Debugger.

iOS changing my app name

I was playing around with my app and tried to rename the app. And now I have the name stuck for some reason. I want to name it "MantisX", butfor some reason I have it stuck as "DataRecorder". I went into Targets and selected my app and changed the name to MantisX. But for some reason it still shows up as DataController. If I go into schemes, it only let's me select DataController.app, even if I go into manage screens it has MantisX, but for some reason DataController is still around. I somehow wedged it, and I can't figure out how to change it. See the screenshots below..
I've already tried deleting the DerivedData folder and all it's subfolders/files and deleting XCUserData and XCSharedData and build->clean and restarting xcode and deleting the app from my phone and for some reason that dumb little icon hasn't updated it's text.
You should select target want edit and go tab info and rename field like screenshot below:

Forcing crash symbolication in crashes organizer and Xcode 7

Currently, my crash organizer looks as follows.
I have not really worked with crash logs before, but to me the crashes do not look symbolicated. I am unable to find where the app has crashed and for what reason. In addition, when I open the stack trace in the project, nothing is highlighted and I cannot tell and which line it crashed in the file. My question is: is there a way to symbolicate all these crashes from within the organizer, or must it be done through terminal?
Thanks.
What you're seeing is that the SDK classes like UITableView are symbolicated, but classes from your "YLSA" app are not. Both should be symbolicated automatically, but in my experience one or the other (or both) often do not symbolicate. I've been developing for iOS for five years and this has been a persistent problem through all the different Xcode versions.
I'm seeing the same problem as you in Xcode 7, but I was able to symbolicate my logs with this workaround:
In the list of crash logs, right-click the desired log and select Show in Finder. This will show you a package containing one or more .crash files and some metadata.
Navigate through the package until you find a crash log. You will see that the same info has or hasn't been symbolicated here.
In Xcode, open the Devices window and select a connected device, then click the View Device Logs button.
Drag the crash log in step 2 from the Finder into the list of logs for this device.
When I do this, I never see the log I added appear in the list, but if I click the headings once or twice to re-sort the list, then I see it.
After a moment, the crash log will become completely symbolicated.
If you already have a lot of logs in your list, you can compare the date, iOS version and hardware model as you view the log in the Finder to the logs in Xcode to make sure you're viewing the same log. Then look at the line that says "Triggered by Thread" to get the thread number that crashed, then scroll down to that thread to see the code that triggered the crash.
This worked for me today with Xcode 7. I hope it helps you!
When you submit apps through Xcode, an option will appear to include debug symbols. Next time you submit an app version, be sure to select that; if you did not, that might explain the problem you're seeing. Unfortunately there's no way to retroactively do that for app versions already submitted, so you'll have to wait until you're ready to submit the next version to see if that was the problem.

Xcode Project broken after renaming and rebuilding (App cleaned, and ran at the same time, and schemes broke)

I was renaming my app from "App's Name?" to "Apps Name", removing the question mark and apostrophe, to prevent the error "A signed resource has already been added, modified, or deleted". However, at one point, the project seemed to clean itself and try building/running at the same time, which caused the build to fail. So I closed and reopened Xcode, and the project is now broken. I can't save it, or build or clean it (all these options are greyed out in the menu). It shows a wheel next to my project and says my device is ineligible, whilst not allowing me to switch to any simulators.
I addition, when I try changing the app name in the File Inspector, and hit enter, the following popup appears:
http://i.imgur.com/vfLMzlG.png
Does anyone know how to fix this?
EDIT: So I think I've found out it's to do with the Schemes messing up. Here's a screenshot of my Schemes:
http://i.imgur.com/4uOMg9d.png
So, is there any way to remove the other 2 schemes, leaving just the one in the middle? This may fix my issue.
EDIT 2: So I've solved the issue by going into "Edit Schemes", and changing the executable in the "Run" section to be the same as the scheme I wanted to use, rather than being "Ask on launch". Hope this helps someone in the future!
So I've solved the issue by going into "Edit Schemes", and changing the executable in the "Run" section to be the same as the scheme I wanted to use, rather than being "Ask on launch". Hope this helps someone in the future!

Resources