Exemplo n.º 1
0
        public static PBXShellScriptBuildPhase Create(string uid, string name, string script, string shell)
        {
            if (string.IsNullOrEmpty(uid))
            {
                throw new System.ArgumentNullException((uid).ToString(), "uid cannot be null or empty");
            }

            PBXProjDictionary emptyDic = new PBXProjDictionary();

            emptyDic.Add(isaKey, PBXTypes.PBXShellScriptBuildPhase.ToString());
            PBXBaseBuildPhase.PopulateEmptyDictionary(emptyDic);
            emptyDic.Add(INPUT_PATH_KEY, new PBXProjArray());
            emptyDic.Add(OUTPUT_PATHS_KEY, new PBXProjArray());
            emptyDic.Add(SHELL_PATH_KEY, DEFAULT_SHELL);
            emptyDic.Add(SHELL_SCRIPT_KEY, "\"\"");
            var buildPhase = new PBXShellScriptBuildPhase(uid, emptyDic);

            if (!string.IsNullOrEmpty(name))
            {
                buildPhase.Name = name;
            }

            buildPhase.ShellPath = shell;
            buildPhase.Script    = script;
            return(buildPhase);
        }
        public static PBXFrameworksBuildPhase Create(string uid)
        {
            if (string.IsNullOrEmpty(uid))
            {
                throw new System.ArgumentNullException(nameof(uid), "uid cannot be null or empty");
            }

            PBXProjDictionary emptyDic = new PBXProjDictionary();

            emptyDic.Add(isaKey, PBXTypes.PBXFrameworksBuildPhase.ToString());
            PBXBaseBuildPhase.PopulateEmptyDictionary(emptyDic);
            return(new PBXFrameworksBuildPhase(uid, emptyDic));
        }