public bool AddHeaderSearchPaths(PBXList paths) { foreach (KeyValuePair <string, XCBuildConfiguration> buildConfig in buildConfigurations) { // Debug.Log( "ADDING HEADER PATH: " + paths + " to " + buildConfig.Key ); buildConfig.Value.AddHeaderSearchPaths(paths); } modified = true; return(modified); }
protected bool AddSearchPaths(PBXList paths, string key, bool recursive = true) { bool modified = false; if (!ContainsKey(BUILDSETTINGS_KEY)) { this.Add(BUILDSETTINGS_KEY, new PBXDictionary()); } foreach (string path in paths) { string currentPath = path; if (recursive && !path.EndsWith("/**")) { currentPath += "/**"; } // Debug.Log( "adding: " + currentPath ); if (!((PBXDictionary)_data [BUILDSETTINGS_KEY]).ContainsKey(key)) { ((PBXDictionary)_data [BUILDSETTINGS_KEY]).Add(key, new PBXList()); } else if (((PBXDictionary)_data [BUILDSETTINGS_KEY]) [key] is string) { PBXList list = new PBXList(); list.Add(((PBXDictionary)_data [BUILDSETTINGS_KEY]) [key]); ((PBXDictionary)_data [BUILDSETTINGS_KEY]) [key] = list; } currentPath = "\\\"" + currentPath + "\\\""; if (!((PBXList)((PBXDictionary)_data [BUILDSETTINGS_KEY]) [key]).Contains(currentPath)) { ((PBXList)((PBXDictionary)_data [BUILDSETTINGS_KEY]) [key]).Add(currentPath); modified = true; } } return(modified); }
public bool AddPushSystemCapabilities(bool value) { bool modified = false; PBXList targets = ((PBXList)_data [TARGET_KEY]); if (!ContainsKey(ATTRIBUTES_KEY)) { this.Add(ATTRIBUTES_KEY, new PBXDictionary()); modified = true; } PBXDictionary attributes = ((PBXDictionary)_data [ATTRIBUTES_KEY]); if (!attributes.ContainsKey(TARGET_ATTRIBUTES_KEY)) { attributes.Add(TARGET_ATTRIBUTES_KEY, new PBXDictionary()); modified = true; } PBXDictionary targetAttributes = ((PBXDictionary)attributes [TARGET_ATTRIBUTES_KEY]); foreach (object target in targets) { string targetKey = (string)target; if (!targetAttributes.ContainsKey(targetKey)) { targetAttributes.Add(targetKey, new PBXDictionary()); PBXDictionary targetAttribute = (PBXDictionary)targetAttributes [targetKey]; targetAttribute.Add("SystemCapabilities", new PBXDictionary()); PBXDictionary systemCapabilities = (PBXDictionary)targetAttribute ["SystemCapabilities"]; systemCapabilities.Add("com.apple.Push", new PBXDictionary()); PBXDictionary applePush = (PBXDictionary)systemCapabilities ["com.apple.Push"]; if (value) { applePush.Add("enabled", 1); } else { applePush.Add("enabled", 0); } modified = true; } else { PBXDictionary targetAttribute = (PBXDictionary)targetAttributes [targetKey]; if (!targetAttribute.ContainsKey(TEST_TARGET_ID_KEY)) { if (!targetAttribute.ContainsKey("SystemCapabilities")) { targetAttribute.Add("SystemCapabilities", new PBXDictionary()); } PBXDictionary systemCapabilities = (PBXDictionary)targetAttribute ["SystemCapabilities"]; if (!systemCapabilities.ContainsKey("com.apple.Push")) { systemCapabilities.Add("com.apple.Push", new PBXDictionary()); } PBXDictionary applePush = (PBXDictionary)systemCapabilities ["com.apple.Push"]; if (applePush.ContainsKey("enabled")) { applePush.Remove("enabled"); } if (value) { applePush.Add("enabled", 1); } else { applePush.Add("enabled", 0); } modified = true; } } } return(modified); }
public bool AddFrameworkSearchPaths(PBXList paths, bool recursive = true) { return(this.AddSearchPaths(paths, FRAMEWORK_SEARCH_PATHS_KEY, recursive)); }
public bool AddLibrarySearchPaths(PBXList paths, bool recursive = true) { return(this.AddSearchPaths(paths, LIBRARY_SEARCH_PATHS_KEY, recursive)); }
public bool AddHeaderSearchPaths(PBXList paths, bool recursive = true) { return(this.AddSearchPaths(paths, HEADER_SEARCH_PATHS_KEY, recursive)); }
public bool SetWeakLink(bool weak = false) { PBXDictionary settings = null; PBXList attributes = null; if (!_data.ContainsKey(SETTINGS_KEY)) { if (weak) { attributes = new PBXList(); attributes.Add(WEAK_VALUE); settings = new PBXDictionary(); settings.Add(ATTRIBUTES_KEY, attributes); _data[SETTINGS_KEY] = settings; } return(true); } settings = _data[SETTINGS_KEY] as PBXDictionary; if (!settings.ContainsKey(ATTRIBUTES_KEY)) { if (weak) { attributes = new PBXList(); attributes.Add(WEAK_VALUE); settings.Add(ATTRIBUTES_KEY, attributes); return(true); } else { return(false); } } else { attributes = settings[ATTRIBUTES_KEY] as PBXList; } if (!attributes.Contains(WEAK_VALUE)) { if (weak) { attributes.Add(WEAK_VALUE); } } else { if (!weak) { attributes.Remove(WEAK_VALUE); } } settings[ATTRIBUTES_KEY] = attributes; if (!this.ContainsKey(SETTINGS_KEY)) { this.Add(SETTINGS_KEY, settings); } else { _data[SETTINGS_KEY] = settings; } return(true); }