Beispiel #1
0
        public bool HasBuildphase(string buildPhaseId)
        {
            if (buildPhaseId != null && data != null && data.ContainsKey(BUILDPHASES_KEY))
            {
                PBXList buildPhases = (PBXList)data[BUILDPHASES_KEY];

                if (buildPhases != null && buildPhases.Count > 0)
                {
                    foreach (string buildPhase in buildPhases)
                    {
                        if (buildPhase.Contains(buildPhaseId))
                        {
                            return(true);
                        }
                    }
                }
            }
            return(false);
        }
Beispiel #2
0
        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 += "**";
                }
                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;
                }


                if (!((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[key]).Contains(currentPath))
                {
                    ((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[key]).Add(currentPath);
                    modified = true;
                }
            }

            return(modified);
        }
Beispiel #3
0
 public bool AddFrameworkSearchPaths(PBXList paths, bool recursive = true)
 {
     return(this.AddSearchPaths(paths, FRAMEWORK_SEARCH_PATHS_KEY, recursive));
 }
Beispiel #4
0
 public bool AddLibrarySearchPaths(PBXList paths, bool recursive = true)
 {
     return(this.AddSearchPaths(paths, LIBRARY_SEARCH_PATHS_KEY, recursive));
 }
Beispiel #5
0
 public bool AddHeaderSearchPaths(PBXList paths, bool recursive = true)
 {
     return(this.AddSearchPaths(paths, HEADER_SEARCH_PATHS_KEY, recursive));
 }