public static PBXNativeTarget Create(string name, string productRef, string productType, string buildConfigList) { var res = new PBXNativeTarget(); res.guid = PBXGUID.Generate(); res.m_Properties["isa"] = "PBXNativeTarget"; res.m_Properties["buildConfigurationList"] = buildConfigList; res.m_ListProperties["buildPhases"] = new List <string>(); res.m_ListProperties["buildRules"] = new List <string>(); res.m_ListProperties["dependencies"] = new List <string>(); res.m_Properties["name"] = name; res.m_Properties["productName"] = name; res.m_Properties["productReference"] = productRef; res.m_Properties["productType"] = productType; return(res); }
// name may be null public static PBXCopyFilesBuildPhase Create(string name, string subfolderSpec) { var res = new PBXCopyFilesBuildPhase(); res.guid = PBXGUID.Generate(); res.m_Properties["isa"] = "PBXCopyFilesBuildPhase"; res.m_Properties["buildActionMask"] = "2147483647"; res.m_Properties["dstPath"] = ""; res.m_Properties["dstSubfolderSpec"] = subfolderSpec; res.m_ListProperties["files"] = new List <string>(); res.m_Properties["runOnlyForDeploymentPostprocessing"] = "0"; if (name != null) { res.m_Properties["name"] = name; } return(res); }
public static PBXFileReference CreateFromFile(string path, string projectFileName, PBXSourceTree tree) { string guid = PBXGUID.Generate(); var fileRef = new PBXFileReference(); fileRef.guid = guid; fileRef.path = path; fileRef.name = projectFileName; fileRef.text = String.Format("{{isa = PBXFileReference; lastKnownFileType = {0}; name = {1}; path = {2}; sourceTree = {3}; }}", FileTypeUtils.GetTypeName(Path.GetExtension(fileRef.name)), PBXStream.QuoteStringIfNeeded(fileRef.name), PBXStream.QuoteStringIfNeeded(fileRef.path), PBXStream.QuoteStringIfNeeded(FileTypeUtils.SourceTreeDesc(tree))); return(fileRef); }
public static PBXBuildFile CreateFromFile(string fileRefGUID, bool weak, string compileFlags) { var buildFile = new PBXBuildFile(); buildFile.guid = PBXGUID.Generate(); buildFile.fileRef = fileRefGUID; buildFile.postfix = ""; if (weak || !string.IsNullOrEmpty(compileFlags)) { string data = ""; if (weak) { data += "ATTRIBUTES = (Weak, ); "; } if (!string.IsNullOrEmpty(compileFlags)) { data += "COMPILER_FLAGS = \"" + compileFlags.Replace("\"", "\\\"") + "\"; "; } buildFile.postfix = "settings = {" + data + "}; "; } return(buildFile); }