This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// $/usr/bin/xcrun --sdk macosx swift replacePlistEnvironmentVariables.swift "$inputfile.plist" "$outputfile" | |
// This will replace all the referenced enviroment variables with their value, for example: | |
// <string>$(A_VARIABLE)</string> | |
import Foundation | |
enum ScriptError: Error { | |
case invalidPlistArgument(argument: URL) | |
case sameInputAndOutptFile | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Add this to a custom build phase script to enable preprocessing plist files. | |
# | |
# This takes as input all the input files from the build phase script | |
# and runs the preprocessor using the token definitions from the GCC_PREPROCESSOR_DEFINITIONS | |
# enviroment variable. | |
# | |
# This allows you to have the following plist: | |
# | |
# <dict> |
OlderNewer