Does Xcode implicitly convert plists's to binary format?
Asked Answered
I

2

8

Does Xcode implicitly convert plists in a project to binary during the building process? I don't think it does this implicitly but having a hard time determining for sure.

Isobelisocheim answered 10/9, 2012 at 19:52 Comment(0)
R
7

There is a build setting named "Property List Output Encoding" (a.k.a PLIST_FILE_OUTPUT_FORMAT) which can be used to tell Xcode to convert copied plists to a different format when performing a build. The default value is "same-as-input" though, so it shouldn't do any conversion unless you specifically change that value to something else. If you would like to have your plists converted to binary, to save space and/or load time, just change that setting to "binary" in your target's build settings in Xcode.

Rota answered 17/1, 2013 at 0:27 Comment(3)
Hmm... how do I know that the conversion works? I tried this setting but when I browse the Derived Data in the Organizer for the app, it seems to still be in XML format. Also, there is another setting APPLY_RULES_IN_COPY_FILES, and the description says: "Files copied with a 'Copy Files Build Phase' are unchanged by default. Setting this to TRUE causes Property Lists (.plist) and Strings files to be converted as specified by 'Property List Output Encoding' and 'Strings file Output Encoding'." However, I tried this set to TRUE but it doesn't seem to make any difference.Singleminded
@Singleminded This actually works, there is no need to modify APPLY_RULES_IN_COPY_FILES. The Finder shows it as a text representation in QuickLook, but if you open the actual file with a text editor like VIM you will see it is binary. Running file on the file will show the difference (try changing the PLIST setting to Same As Input)Surrender
this links helps me : imnotyourson.com/diffable-and-mergeable-localizable-strings tooTumultuous
T
1

For everyone who is facing the Localizable.strings binary format, here is a link helped me: link

You will find the properties under Build Settings -> Packaging section (with All option).

Tumultuous answered 18/4, 2017 at 14:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.