Class InfoPlistSubstitution

  • public class InfoPlistSubstitution
    extends Object
    Utility class to substitute Xcode Info.plist variables in the forms: ${FOO} $(FOO) ${FOO:modifier} $(FOO:modifier) with specified string values.
    • Method Detail

      • getVariableExpansionForPlatform

        public static Optional<String> getVariableExpansionForPlatform​(String keyName,
                                                                       String platformName,
                                                                       Map<String,​String> variablesToExpand)
        Returns a variable expansion for keys which may depend on platform name, trying from most to least specific. While it doesn't capture all arbitrary wildcard expansions, it should handle everything likely to occur in practice.


        keyName - The name of the parent key. e.g. "VALID_ARCHS"
        platformName - The name of the platform. e.g. "iphoneos"
        variablesToExpand - The mapping of variable keys to values.
        Optional containing the string value if found, or absent.
      • createVariableExpansionFunction

        public static java.util.function.Function<String,​String> createVariableExpansionFunction​(Map<String,​String> variablesToExpand)