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)); }
//TODO change to adding the actual object public void AddBuildPhase(PBXBaseBuildPhase phase) { if (phase == null) { return; } if (BuildPhaseIDs.Contains(phase.UID)) { return; } _buildPhases.Add(phase); Dict.ArrayValue(BUILD_PHASES_KEY).Add(phase.UID); }