Is it possible to show Authors in files that are not .swift, .m, .h etc. in Xcode 11+?
For example .pbxproj, or .xib or .storyboard Interface Builder files.
"Show Authors" via ⌃⇧⌘A is not working, as it does for text source files.
Related
I'm trying to follow the tips in Apple's I18N and L10N Guide. I have a pre-existing project from which I have (long ago) deleted the Base.lproj folder. Why? Because I have no Main.storyboard or LaunchScreen.xib. Both of those things are handled programmatically.
However I do have a large number of subsidiary storyboards, including a WatchKit Interface.storyboard. When I click the + in the Project (not target) Localizations section, Xcode presents a dialog that lists only the Interface.storyboard file. Not any of the many others.
How can I persuade Xcode to help me localize the other storyboards? Can I do this all manually? As usual, I am sure it is my mental model that needs refinement.
This is an example where configuration yields convention. That is, if you customize your folder hierarchy, Xcode can adapt and implement its naming conventions.
Select storyboard file in left pane (Project navigator)
Click Doc icon (File inspector) in right pane
Click Localize...
This will create a new Base.proj folder inside whatever folder holds the storyboard. If you are like me, you have done lots of folder-factoring. Xcode goes along with this.
Then you go back to the Project Localizations section and click + to add locales. Xcode creates extracts the strings from your storyboard and creates new folders for the corresponding .strings files.
I'm trying to follow Apple's localization guide with my project, but after I select Editor -> Export for Localization, the resulting .xliff file doesn't contain any strings from .xib files.
It has only strings from Localizable.strings and from Info.plist.
I did it!
Turns out, it was a project created in old Xcode version that doesn't support Base Internationalization.
I had to
Press “Localize” on all the xibs in the project
Then go to Project Settings and in the Info tab check “Use Base Internationalization” checkmark.
After this, the resulting .xliff file has all the .xib strings.
Recently, some revision was done to one of my projects and the project had to be re-imported from SVN. All of the files are there, but I get weird issues when trying to use some of the project files.
For example, when selecting a view in IB, the assistant view would automatically show the associated header file for that view. Now, there is nothing under the 'Automatic' tab in the assistant view.
Also, when trying to #import certain files and create instances of them, xcode returns the error Unknown type name
I seemed to have resolve the issue. I had to create a new .h and .m file and copy the contents of the old .h and .m into the new one. Once I set the view in storyboard to use this file I no longer received any errors.
My xcode start to cracking up and now it always open xib files with XML source editor instead of in interface builder.
I know how to fix this problem for specific file by changing file type at the "Get Info" of the file.
My question is how can i solve the root of the problem and make xcode to make xib files as file.xib by default?
Thanks!
In XCode preferences under "File Types" make sure xib files are opened using "External Editor (Currently Interface Builder)"
After I Commit Entire Project, in the left pane, under the SCM twisty, I still see the listing for English, which is described as MainMenu.nib (English) in the top right pane.
The file is already added to the repository, because I can select SCM | Repositories from the menu bar and then browse all the way to <REPOSITORY>:<PROJECT HOME>/English.lproj/MainMenu.nib which contains classes.nib, info.nib, keyedobjects.nib.
Hmm, actually, when I Reveal in Finder the working copy of MainMenu.nib (English), and then in Finder, Show Package Contents, I see it only contains two files: designable.nib, and keyedobjects.nib.
That doesn't seem good. Any idea what is going on?
I am using Xcode 3.2.3 on OS X 10.6.4.
Thanks.
You should be using .xib files and not .nib From Apple's interface builder guidelines
When you save an Interface Builder document, you save it using either the xib file or nib file format. Both formats store the same information but do so in different ways. Xib files are intermediate XML–based files that are intended for use only during the development of your project. Because they are text-based, you can save them in your source-code management system and perform diffs on them. During deployment, xib files are converted to nib files, which contain a binary version of the document data and are what your application actually loads at runtime. For any new projects, you should save your documents as xib files. For existing projects, you can also save your documents directly to the nib file format.
In this case it might not fix your issue but you should be able to see what the differences are.