Editor doesn't open in Xcode - xcode

i have a weird problem with Xcode. Here's a screenshot:
When i usually clicked on the file in the left column it'd open in source code editor on the right. Now it doesn't happen. Does anyone know how to get it back the way it was before? it drives me crazy
greetings
peter

What happens if you click on the Project, test, at the top, and then click in the columns on the right. Will it open the file in the editor?

Quit Xcode and relaunch it.

I see this is a little old now, but I had the same problem. The thing that I had to do was to open the "interface builder" program, wich is the editor for the file, then find and open the .xib file from that program. Next time I tried open it with Xcode it worked.

Drag a source file from the Groups and Files pane (usually on the left) over into the pane that says "No Editor". No need to reset the defaults.

Related

Where is the windows terminal settings location?

I edited the settings file and there must have been a typo and now the app crashes on startup.
Online the documentation says the settings lives in $env:LocalAppData\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
I can't figure out what that path means since it doesn't exist on the computer.
I re-installed the app to fix the problem then made sure to see what the actual path is.
It's located in : C:\Users\{USERNAME}\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
In the current version (1.7.1033.0), the application can open the JSON settings file for you via a button. Open the Settings tab, and the bottom left corner will have a button named "Open JSON file". Clicking that button will open a prompt asking with what application to open the file. That text editor can then tell you where the file is located.
If you open the terminal settings, it will open a text editor with the settings.json file. If your default editor is VS Code it will show you the path below the tabs on the top of the screen.
I'm unsure what other editors show you the path, but if it is crucial you can change your default text editor to Code.
There is still the option to open the JSON file through settings. In version 1.15.2875.0 you can still find the "Open JSON file" at the bottom left corner
Screenshot with highlights
This hint was given by a comment by user1340531:
Mine is at C:\Users\{username}\AppData\Local\Microsoft\Windows Terminal\settings.json
(or more generically: %userprofile%\AppData\Local\Microsoft\Windows Terminal\settings.json)
If it's not there, you should consider OP's answer or vyps comment which lets you find out one of these generic paths (they are equivalent):
%userprofile%\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
%LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
$env:LocalAppData\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
If you don't know what these paths mean, I'd recommend playing around with "Windows Run" (Win+R) and the explorer address bar.

Xcode 6 - Main.storyboard only showing up as source code, Interface Builder missing

Somehow my Xcode settings got messed up as it would only show my Main.storyboard file as XML code. I've been told this can be fixed by selecting the Interface Builder from the "Open As" menu, but there is nothing under the menu (the only "selection" is a greyed-out "<None>"). I've cleared my Xcode caches, but this does not help. Other than that, my project still compiles properly.
How can this be resolved?
As so many people have pointed out, right-click on the file and hover over Open As and select Default - Interface Builder.
However, if this is not an option for you because Open As shows <None>, make sure you are in the standard editor and not the version editor. Go up to View in Xcode menu --> view --> hover over Standard Editor and select Show Standard Editor. Now repeat the steps others have suggested and you should get the results you're looking for.
Hide Code Review helped here (Xcode 12.2).
You might be in code review mode and Xcode thinks you want to compare the XMLs
change to Standard Editor by clicking 'Command + Enter' key . Then Main.storyboard may show as Interface Builder.
I had the same issue, where "Open As" wasn't an option on the main storyboard, and xibs were also showing as XML.
The solution that worked for me was to right click on an xib which did have the "Open as --> Interface Builder" option. Then, I went back to storyboard, and the main storyboard showed up properly.
Tap on the Arrows icon that are left and right, see image below:
If you go over to the project outline and control click on the storyboard file and hold down the cursor, you will see the option to open as, this will let you open the storyboard as a certain type. Click on that and choose open as story board. Good luck!
EDIT#1
Sorry, I think I misread your post. I thought you were doing those steps from the menu bar. Not the outline. I am assuming you have restarted Xcode and your computer.
I had this issue with Xcode 8, no luck with Open As > menu... and the solution was as follow:
Make sure the Type is Default - Interface Builder in the Identity and Type right panel (see screenshot). In my case it was "Swift source code" selected :
Now, in the left pane, right-click on your storyboard, and magically then the option Open As > Interface Builder - Storyboard appeared !
I had "Main.storyboard.xml" in Xcode 9 folder but can not see "Default - Interface Builder" in the list of extensions proposed in "Identity and type".
I simply deleted the .xml extension in the name of "Identity and type" and then I can see again "Default - Interface Builder" in Open as.
This is just a quick fix/ long shot, and depending on the specifics of your situation it might not be helpful at all, but you can import and open storyboard files in other projects.
So, try importing your storyboard file in a new project and see if it displayed correctly there.
Has helped me in the past with misbehaving nib files.
Took some doing but I found how to fix this every time... When you click on the storyboard and it is showing as source, click on the icon that shows the utilities view on the righthand side.. Look for the identity type.. Type should be Default - Interface Builder.. Mine got switch to C Source Code.. Not sure how.. but...
I was stuck at (Hide Code Review helped here . You might be in code review mode and Xcode thinks you want to compare the XMLs)
left and right arrow icons is code review Mode

Xcode doesn't open a project normally

I'm using Xcode 4.1 and it has always worked perfectly but today something wrong has happened. Instead of opening my project as it usually does it opens just code editor and nothing else. I have restarted my computer but it doesn't help. Other projects are opened normally. Can you give me a hint about what's going on and what should i do to fix it?
View --> Show Toolbar ,
View --> Show Assistant Editor ,
View --> Show Project navigator
and so on.
The solution, as others wrote before, is to reopen the missing panes and toolbar via the menu.
The cause of the problem is simple: If you open a source file in its own window (by double clicking it in the navigator or so) it just shows the editor pane. if you then close the main project window and the single source window afterwards, Xcode saves that last window state as the current view configuration in the project.
The intermediate solution is to never close the project window before closing all other source windows. But Apple should really fix this stupid bug. It has been around for too long.
Go to
View --> Show Toolbar.
I've had this before, don't know how it happened, but this fixed it.

Multiple editor windows in Xcode

When coding in Xcode, I double-click a file in the "Groups and files" list, and it opens a new editor window. I have several of these open at once.
Until today.
Today, when I double-click a file in the list, it opens the file in the last editor window I was using, meaning I can only have one editor window up at any one time.
I guess I've switched some option somewhere by mistake. How do I get it back to the way I like it?
I'm using Xcode 3.2.5
In the top right of the editing window is an icon that says "grouped", perhaps you clicked on it by accident.
Click on it so it says "ungrouped", and you'll be back to opening multiple windows.
perhaps preferences>General>Open Counterpart in same Editor

XCode - I cannot seem to remove files from a project

When i highlight a file and choose Edit->delete nothing happens.
What is going on. This is in the XCode IDE for Max OS
Try right clicking (two fingers, or cmd click) the file and selecting delete. It may be that edit>delete only works for code editing.

Resources