Modifiying an xcode strings file post Archive: Converting Binary to UTF-8 - iphone

During the build and archive of my application the .strings files are copied into the application bundle, e.g.
CopyStringsFile
/Users/Systems/Library/Developer/Xcode/DerivedData/MyProject-dqtbpsfqkwnliuflrsytopqbuvpr/Build/Intermediates/ArchiveIntermediates/Evolve/InstallationBuildProductsLocation/Applications/Evolve.app/en.lproj/InfoPlist.strings
MyProject/en.lproj/InfoPlist.strings
cd /Users/Systems/luke/repos/MyProject/MyProject
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-copyStrings --validate --inputencoding utf-8 --outputencoding binary --outdir /Users/Systems/Library/Developer/Xcode/DerivedData/MyProject-dqtbpsfqkwnliuflrsytopqbuvpr/Build/Intermediates/ArchiveIntermediates/Evolve/InstallationBuildProductsLocation/Applications/Evolve.app/en.lproj
-- MyProject/en.lproj/InfoPlist.strings
Unzipping the ipa and loading the string file into a text editor shows the binary content.
I would like to use bash to read the content of the strings file in ASCII UTF-8, find and replace some strings and encode it into binary again.
Specifically, how should I decode the contents of the file into ASCI?

It turned out it was a super simple bash command:
plutil -convert xml1 <PATH_TO_STRINGS_FILE>
And to convert it back again:
plutil -convert binary1 <PATH_TO_STRINGS_FILE>

Related

How to Convert .USDz formats to .OBJ or .ABC files?

I have been trying to build a solution to converting from .USDZ to other [3D formats].
Using online options you may convert [3D formats] to .USDz using:
https://www.vectary.com/3d-modeling-how-to/how-to-create-usdz-file-for-ar-online/
or
https://www.vectary.com/3d-modeling-news/usdz-converter-create-usdz-files-for-free-online-with-vectary/
Using Houdini plugins was not successful I was only able to import not export .USDz.
This basic command line converts from OBJ files, Single-frame Alembic (ABC) files, USD file (either .usda or usd.c) to .USDz.
xcrun usdz_converter myFile.obj myFile.usdz
Will this command convert the other way.
I have also found that this command line will convert [.OBJ, .ABC] to .USDz but don't know if it will convert the other way:
usdcat --flatten -o myFIle.abc myFile.usd
If you have macOS + Xcode you can open .usdz file in the default viewer and export it to .obj file.
With your mydocument.usdz file open, select File -> Export and then select "Geometry Definition File Format"

How can I make ExtUtils::Manifest include empty directories?

I am trying to build a Perl module for distribution. The directory structure looks like this:
demo
demo/files
demo/examples/example1.pl
demo/scripts
lib
I used this command to generate the MANIFEST file:
perl -e "use ExtUtils::Manifest qw(mkmanifest); mkmanifest();"
The file is created but all of the empty folders are ignored, so demo/files and demo/scripts are not in the MANIFEST.
How can I tell ExtUtils::Manifest to include empty folders?
Create a zero byte file called .exists in the otherwise empty directories.

How to pass a local file name to css-validator.jar?

I'm trying to open a file from the filesystem with css-validator.jar. I tried:
java -jar css-validator.jar C:\filename and
java -jar css-validator.jar file:\\\filename
but neither worked.
What am I doing wrong?
Figured it out on my own: command used in directory of jar is like this:
java -jar css-validator.jar -output gnu file:///"Directory of file"\"name of css file".css
You can then add > or >> and a text type file extension (.txt, .html, .xml, .doc[but not .docx]) to output to file. the gnu can also be text, xml, or a couple other formats.

How do I Extract Files Into Jar Files with Command Prompt on Windows 7?

I want to extract files into a jar file, any way I can do it with command prompt?
To insert / compress files into a jar (foobar.jar)
jar cvf foobar.jar foo.txt bar.txt
to extract all of them
jar xvf foobar.jar
to extract only foo.txt for example
jar xvf foobar.jar foo.txt

Compile iOS strings files from command line

Compiled iOS apps have localized strings files compiled into binary PList files and they are converted by Xcode.
Is there any way to compile them from command line from the original strings files?
I think I found what I was looking for:
plutil -convert binary1 Localizable.strings
plutil it is.
The build task is here /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/CopyStringsFile.xcspec
It runs copystrings ruby script, which is based on iconv and plutil