Skip to content

Instantly share code, notes, and snippets.

View tritter's full-sized avatar

Thom Ritterfeld tritter

View GitHub Profile
@tritter
tritter / createInfoPlistStrings.sh
Last active June 9, 2016 19:37
script is intended to use inside an Xcode project's build steps. It creates a InfoPlist.strings file that are used by the system to localize Info.plist values.
#!/bin/bash
# Thom Ritterfeld 2016
# This script is intended to use inside an Xcode project's build steps. It creates a InfoPlist.strings file that are used by the system to localize Info.plist values.
# Define localize keys values, the values are the ones that need to be placed inside InfoPlist.strings.
# For example in Localizable.strings you defined: "note_location_disclaimer" = "we want to know where you work";
# This script will add "NSLocationWhenInUseUsageDescription" = "we want to know where you work"; into InfoPlist.strings.
# To define these keys define the key of Localizable.strings into localizable_keys and the key for InfoPlist.strings into info_plist_keys.
# Use the same positions, because of lack of good dictionary support. For the sample:
# localizable_keys=("NSLocationWhenInUseUsageDescription=note_location_disclaimer")