public override void UpdateProps() { SetPropertyString("fileRef", fileRef); PBXElementDict settings = null; if (m_Properties.Contains("settings")) { settings = m_Properties["settings"].AsDict(); } if (compileFlags != null && compileFlags != "") { if (settings == null) { settings = m_Properties.CreateDict("settings"); } settings.SetString("COMPILER_FLAGS", compileFlags); } else { if (settings != null) { settings.Remove("COMPILER_FLAGS"); } } UpdatePropsAttribute(settings, weak, "Weak"); UpdatePropsAttribute(settings, codeSignOnCopy, "CodeSignOnCopy"); UpdatePropsAttribute(settings, removeHeadersOnCopy, "RemoveHeadersOnCopy"); if (assetTags.Count > 0) { if (settings == null) { settings = m_Properties.CreateDict("settings"); } var tagsArray = settings.CreateArray("ASSET_TAGS"); foreach (string tag in assetTags) { tagsArray.AddString(tag); } } else { if (settings != null) { settings.Remove("ASSET_TAGS"); } } if (settings != null && settings.values.Count == 0) { m_Properties.Remove("settings"); } }
protected void SetPropertyString(string name, string value) { if (value == null) { m_Properties.Remove(name); } else { m_Properties.SetString(name, value); } }