public void AddReference(string productGroup, string projectRef) { projectReferences.Add(ProjectReference.Create(productGroup, projectRef)); }
public override void UpdateVars() { projectReferences = new List <ProjectReference>(); if (m_Properties.Contains("projectReferences")) { var el = m_Properties["projectReferences"].AsArray(); foreach (var value in el.values) { PBXElementDict dict = value.AsDict(); if (dict.Contains("ProductGroup") && dict.Contains("ProjectRef")) { string group = dict["ProductGroup"].AsString(); string projectRef = dict["ProjectRef"].AsString(); projectReferences.Add(ProjectReference.Create(group, projectRef)); } } } targets = GetPropertyList("targets"); buildConfigList = GetPropertyString("buildConfigurationList"); // update knownAssetTags knownAssetTags = new List <string>(); if (m_Properties.Contains("attributes")) { var el = m_Properties["attributes"].AsDict(); if (el.Contains("knownAssetTags")) { var tags = el["knownAssetTags"].AsArray(); foreach (var tag in tags.values) { knownAssetTags.Add(tag.AsString()); } } capabilities = new List <PBXCapabilityType.TargetCapabilityPair>(); teamIDs = new Dictionary <string, string>(); if (el.Contains("TargetAttributes")) { var targetAttr = el["TargetAttributes"].AsDict(); foreach (var target in targetAttr.values) { foreach (var attr in target.Value.AsDict().values) { if (attr.Key == "DevelopmentTeam") { teamIDs.Add(attr.Key, attr.Value.AsString()); } if (attr.Key == "SystemCapabilities") { //var caps = el["SystemCapabilities"].AsDict(); foreach (var cap in attr.Value.AsDict().values) { var capab = PBXCapabilityType.StringToPBXCapabilityType(cap.Key); var capabValue = cap.Value.AsDict(); bool isEnabled = false; if (capabValue.Contains("enabled")) { string enabledString = capabValue.values["enabled"].AsString(); isEnabled = string.IsNullOrEmpty(enabledString) ? false : enabledString.Equals("1"); } capabilities.Add(new PBXCapabilityType.TargetCapabilityPair(attr.Key, capab, isEnabled)); } } } } } } }