I cannot seem to add any simulated location to the simulator, as the corresponding menu is completely greyed out, as shown in figure:
the location works well when debugging with the actual device.
any idea?
The iOS Simulator must be running your app before that menu will be enabled. For me it appears immediately after a successful build.
If it's proving inconvenient to make a selection in that menu between build of your app and it's launch, I would recommend setting a default location via Product -> Scheme -> Edit Scheme. You can then select your preferred default in the Run / Options panel after checking the "Allow Location Simulation" box.
Related
After upgrading to 8.3 Xcode I realize that the location icon is no longer there to add custom GPX location. Does anybody know where this icon was set to or is it completely remove.
The presence of this button is controlled by a setting in your scheme. Click on the Scheme popup in Xcode's toolbar, choose Edit Scheme from the menu, select the Run action, then click the Options tab, and verify that "Location Simulation" is checked.
I have tried disabling "show in destination menu". But that does not work.
I am trying to hide all version except 8.4 & 9.0 without uninstalling them. How can that be done?
I hope this question is not considered a non-programming question. Because there is no answer anywhere for this.
I also tried hiding certain Simulators that I usually don't build for to help reduce menu clutter. Unchecking the 'show in destination menu' option also did not have any effect.
The best I could do was to just delete the Simulator from the Devices window.
I know that if I wanted to re-add that simulator for future testing, all I had to do was tap the '+' icon, and click 'Add Simulator', and add the desired Simulator.
I can't find the Debug View Hierarchy button in Xcode.
I've read this:
Xcode 6.1 can't find 'debug view hierarchy' button
and launched my app on the iOS8 simulator but still no luck. Something to do with the Architectures perhaps?
Here's what I'm using:
Check to see if accidentally you have disables User Interface debugging. You can find this option in Edit scheme, check out the screenshot:
Then this button will be back:
Hope it helps someone.
In your scheme settings, accessible via Product>Scheme>Edit Scheme, there is an option called debug executable,
Enable it to make the debug buttons available
On the left side of the debugger, in the toolbar below:
It is the second icon from the right in the image. It might be black or greyed out depending on whether Xcode is in focus or not.
It works fine on device and simulator. Either click it to break or break using a breakpoint/debugger and use it.
Thanks #Tibin Thomas and #Khaled Barazi. The Debug View Hierarchy button only appears if you have
checked the Debug executable box and
run your app on the simulator.
By the way, in Xcode 13.1, the button have already become as following icon
Upon hitting a break point in XCode it switches the left most panel to the Debug Navigator. If I then stop debugging the panel maintains the Debug view and contains the text...
No Debug Session
Then I like to manually switch the panel back to the Project Navigator in order to carry on developing.
Is there a way of configuring XCode such that it automatically switches to the panel layout it had when I started debugging the app?
In Xcode, go to Xcode -> Behaviors -> Edit Behaviors. Select Running | Pauses in the left section of the dialog. In the main section, choose Show Project Navigator.
The Behaviors feature in Xcode is quite powerful for customizing the workflow. I actually like to have separate tabs for editing code, building and running. You can configure the behaviors to switch to the appropriate tab (which is configured to your liking) whenever you build or run the app. Really useful. I think I've learned about it from one of the older WWDC videos about the efficient use of Xcode.
I'm trying to figure out how to use Xcode in a multi-window setup. I would like to have one window be my main window, and then have others that I use to do occasional spot editing. Here's the rub: I never want to have the navigator (or the debug console, for that matter) open in those other windows. I only want the navigator and console to open in the main window.
Right now, when I run the app the debug navigator and console open up in whichever window is frontmost (causing me to have both the main window and the secondary window with console pains and navigator open). Is there anyway to prevent the console and issue navigator from opening on the secondary window while preserving this behavior for the main window?
I'm not sure I fully understand what you want - but you can configure some of these things in the Xcode preferences under "Behaviors". Under "Running" you can click on "Starts" and it will show you the behaviors for when you run your application. You can set it to show a particular tab in the active window or a separate window. You can set up that tab to contain just the debugger. If it does show the debugger in the other tabs, you can minimize the debugger panes, and I believe it will save that state for the next time it launches. See here for more details.
Go to Xcode -> Behaviors -> edit behaviors. Now under build and running uncheck shows Navigator.
In Xcode Preferences > Behaviours > Runnings > Generates output, uncheck Show debugger with Current Views.