How can I make Info.plist display english names?

I have a project with two Info.plist files (one for each purpose). In the second Info.plist , when I add the field, it displays the internal name instead of the English name. For example, UISupportedInterfaceOrientations instead of "Supported Interface Orientations."

Also, when I click on the drop-down list to see all the options, some of the options that are available in the first .plist file are not in the second (like CFBundleIconFiles ). The two problems are actually the same thing (everything that shows the internal name does not appear in the drop-down list).

In both files, the Bundle Verion is 1.1, CFBundleInfoDictionaryVersion same as the plist version and the DTD.

What would stop the second plist from giving me these parameters? Thanks.

alt text http://img.skitch.com/20100708-ctia2e6yfwgd7twdnepryidayr.jpg

+4
source share
3 answers

As a rule, there are times when not all parameters are displayed. If you know that it must exist, you can simply add the key (via copy / paste) from the XML file of another info.plist. Usually I just open it as XML and work in this mode (which gives non-English names).

All keys can be found here: http://developer.apple.com/iphone/library/documentation/General/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html

In the latest Xcode, it automatically converts all the words into English for me, although even when I try to paste as a non-English name into the property list editor.

0
source

Xcode has several different editors to show the contents of plist files. One of them is the general plist editor, which displays key names without translation. The plist editor can also be in the specialized Info.plist mode, where it knows about the structure of this special type of plist file and translates the keys into English.

I donโ€™t know how Xcode decides which editor to use, so the following just guesses: I assume that Xcode is looking at the selected target to check the path to the Info.plist file, and if it is an edited file, it uses a specialized editor. Therefore, if you have one goal selected, but open other Info.plist goals, it can use a common editor.

Xcode also manages file types for each file in the project. You can override Xcode's automatic guesses by opening the file options (click on the file in the form of a diagram and press the -I command). There may be a type file for identifying Info.plist files.

As a last resort, you can always open a file by right-clicking on it in the form of a diagram. In the context menu "Open as ..." you can choose how to open it. I usually use the "Source Code File" because I like to see the source XML.

+1
source

Short answer

Choose iPhone Info.plist from the View menu> Property List.

Description

This actually has nothing to do with the plist file itself. This is how Xcode (through the Property List Editor) represents the file.

You can verify this in Finder by making a copy of the plist file that is displayed correctly. Open the copy in the property list editor (usually this is the default application). Usually a copy does not display English names (until you change the type of the property list).

Xcode will remember the type you selected and save it in a .xcodeproj file.

-1
source

Source: https://habr.com/ru/post/1315073/


All Articles