Somehow I have a .xib file that is hidden. When I right click in Xcode and select "show in finder", it just takes me to the top level project folder. If I search for the file in Alfred, it finds it inside the main project folder inside the en.lproj directory.
I need to copy and paste this .xib file into another project.
How might have this .xib file been placed here instead of in a regular file system directory where I can access it?
How can I get access to it in Finder? Like I said I need to copy the file.
A file is placed into a <lang-code>.lproj
folder if you tell Xcode that this is localized file. When trying to access such a localized file from the resources folder, resource loading code will look what the current system language is and first try to find a file in the .lproj
folder for this language. If such a folder exists and the file is found, it will open it. If not, it will search for the file in the .lproj
folder of the default language. If such a folder exists and the file is found, it will open it. If not, it will search for the file directly in the resources folder. If this file is found there, it will open it. If not, opening the file will fail.
If you cannot open the en.lproj
folder in Finder by just double clicking it, it seems that some application has registered the extension .lproj
as a bundle on your system. Bundles are just folders, but the Finder does not treat them as such. Double clicking a bundle will open it with whatever application registered for this bundle. On my system those folders are no bundle, so Xcode is not making them bundles by default (must be some other application you have installed). Even though bundles are treated specially by Finder, they are still normal folders after all. You can look into a bundle by right clicking it in Finder and selecting Show Package Content
from the context menu. This works with all registered bundles.