XCode immediately show filecontent on click - xcode

I'm new to XCode. I use XCode 3.1.3. In my project, i have on the left side the list of my project files, on the right side there is a textwindow showing code, and on top there's another small field showing some info about the file.
At first, when i clicked in the left list on a file, the file content immediately showed up in the textfield on the right side. However - now i changed something (but i don't know what) and now the field does not anymore automatically show the content of the file. if i double click on the file in the list, a new window opens showing the code - i'd like to get back the initial behaviour.
how can I set this?

I think you're referring to "All-In-One" Layout (changeable in XCode -> Preferences -> General). Mind you - if you want to change layout - you must have all projects closed.

Did you relaunch Xcode? I saw the bug when showing file content just stopped working, but relaunching Xcode always fixed it.

Related

Xcode 10.1 opening wrong file

Just downloaded Xcode 10.1. I have Preferences->Navigation->Double Click Navigation set to 'Uses Seperate Window' as I usually do. However double clicking any file in the project opens a window but the contents of that window is the wrong file. Whichever file I double click on, the same incorrect file opens. If I change double clicking to open in a tab, the correct file is opened...
The problem appears to be just one project.
Have tried a 'Clean Build Folder' to no avail
It was working fine in 10.0
I open the project using the xxxx.xcworkspace (as I have pods in the project).
If I open a new window and view a specific file there then go back to my window with the list of files and double click that file, the correct window is brought to the front with the correct file visible.
Same here. For me it's the Readme.md file that is added at the top level of the project (not inside a group). Removing the reference from the project or putting the top level file(s) in a group (folder) fixed the issue.

iOS - Using Base localization pane is always empty

In Xcode have added two localizations, German and English. I am following documentation on Apple regarding "Use Base Internationalization" which is obtained by going to the project, clicking Info and pressing on the checkbox.
If I do this, it launches a pane or page which is empty.
IE:
How do I get it to be populated, or otherwise be in a situation to select the relevant resource file?
The answer is to localize your storyboards. Go to storyboard, there is a button called localize. If you do this, the pane is no longer empty.
Check the answer from hassan83 (https://stackoverflow.com/users/1586924/hasan83) in another question. It solved my problems.
https://stackoverflow.com/a/27720065/7017099
"This could happen if Base Internationalization was active before then disabled and files deleted manually.
Create Base.lproj folder in your project folder using the finder.
Move your main story board to it also using the finder.
Fix the reference to it from Xcode.
Remove app from device, clean & build
your project.
All will be back to normal."

How do I change Xcode Project Format to Xcode 3.2-compatible?

I am having problems with code completion and read that this will fix it but I don't know where this setting is.
It's highly unlikely that the project format has any bearing on code completion, but if you really want to change it, select the project itself in the file navigator and open the right-side utility pane. In the first tab is the project format drop down.

Xcode 4 file complete path

If I have any file open in Xcode and I would like to know the complete path to the file, how do I do that in Xcode 4? In Xcode 3 I could hover over the file name and get a tooltip with the complete path. I could also right-click a file name at the very top and get a pop-up window with the complete path. This is all gone in Xcode 4.
The annoyance is that when using the Xcode 4 search, it doesn't even show the complete path of the file in the results?!
The only solution I have currently found is to open the save as dialog and get the path from there! That definitely can't be the solution. What am I missing?
For files that are not part of the project you can use the File menu's Show in Finder option.
Update: Xcode 4.2 restored the ability to right-click or command-click on the file's name in the title bar to get a drop-down with the full path.
Show the file inspector utility (normally at the right hand side of the main window on my setup , to do that click the rightmost button of the "View" buttons menu). Click on your file in the navigator and the inspector will refresh with the information. Full path is disclosed and there is a button to open a new Finder window with the enclosing folder.

Xcode 4 shows no files after loading project

I've loaded a project in Xcode 4 after not looking at it for a while. Xcode shows its progress bar and indicates in text that the project is loading, and it appears to finish, but then there are no files shown in the hierarchy or flat views. There is nothing showing in any view (except for one breakpoint in the breakpoints view).
Any ideas? Xcode gives me zero indication that anything is wrong, it shows me nothing.
I just had the same issue. After a few hours scratching my head and trying all kind of things, I finally found a fix: remove the whole package 'project.xcworkspace' inside the XXXXX.xcodeproj package.
More specifically, when you find the 'XXXXX.xcodeproj' file, right-click it, and select 'Show Package Contents'. This will get you inside the package where you will find the 'package.xcworkspace' file. It is best to do this while the Xcode project is closed.
Maybe that will work for you or for others with the same issue in the future...
Some of the project views have the "Recently Changed" filter icon. For me the problem was: i had that enabled in the Project Navigator, so it was only showing the files i recently changed. It looks like this.
I'm using Xcode 6.1 though.
I had a similar issue. After archiving a project the files would disappear from the project navigator.
It turned out that somehow XCode had added the word "main" to the searchbar below the project navigator so that almost all files where invisible. Quite frustrating.
It might be the same case for you..
For those who make it here, I was opening a older version of a similar iOS project after upgrading to the latest XCode (6.2), and was seeing the symptoms labeled in this question (missing files, folders etc.)
My solution: at the bottom left of the screen, unselecting 'Show only files with source-control status" which happened to be set on (it's blue when on). The icon looks like a 4-pt star inside a square.
remove the whole package 'project.xcworkspace' inside the XXXXX.xcodeproj package. may cause to any other error so please ignore and trying finally
You can quit xcode and reload again your project it help you
This happened to me when I tried to do an alt-tab, on a VM running in TeamViewer in Windows - Click the search bar below, enter delete multiple times and the invisible search term cleared up
I had the same issue. Besides the answers above, it could also be that you have already accidentally opened the project in another Xcode window... Close that and reopen everything and it should work.

Resources