コード例 #1
0
        //only used for upgrading from version 1 to 2
        public static BaseFileEntry CreateFromObsolete(PListDictionary dic)
        {
            string path     = dic.StringValue("Path");
            var    fileType = PBXFileTypeHelper.FileTypeFromFileName(path);

            if (PBXFileTypeHelper.IsSourceCodeFile(fileType))
            {
                var entry = CreateSourceEntry(dic);
                return(entry);
            }
            else if (PBXFileTypeHelper.IsFramework(fileType))
            {
                return(CreateFrameworkEntry(dic));
            }
            else if (PBXFileTypeHelper.IsLibrary(fileType))
            {
                return(CreateStaticLibraryEntry(dic));
            }
            else if (PBXFileTypeHelper.IsContainer(fileType))
            {
                return(CreateFileEntry(dic));
            }
            else if (dic.ContainsKey("Files") || dic.ContainsKey("Folders"))
            {
                return(CreateFolderEntry(dic));
            }
            else
            {
                return(CreateFileEntry(dic));
            }
        }
コード例 #2
0
        protected BaseBuildSettingEntry(PListDictionary dic)
        {
            if (dic == null)
            {
                throw new System.ArgumentNullException((dic).ToString(), "Dictionary cannot be null");
            }

            if (!dic.ContainsKey(NAME_KEY))
            {
                throw new System.ArgumentException("No name key in dictionary");
            }

            Name = dic.StringValue(NAME_KEY);
        }
コード例 #3
0
        //PList
        // other replaces this one if match.
        // exception is empty strings. these are skipped
        void MergePListEntries(PListDictionary main, PListDictionary other)
        {
            foreach (var kvp in other)
            {
                //don't overwrite string with empty strings
                var str = kvp.Value as PListString;

                if (str != null)
                {
                    if (main.ContainsKey(kvp.Key) && string.IsNullOrEmpty(str.Value))
                    {
                        continue;
                    }
                }

                main[kvp.Key] = kvp.Value.Copy();
            }
        }
コード例 #4
0
        public SigningChanges(PListDictionary dic)
        {
            if (dic == null)
            {
                return;
            }

            TeamId = dic.StringValue(TEAM_ID_KEY);

            if (dic.ContainsKey(AUTO_PROVISIONING_KEY))
            {
                AutomaticProvisioning = dic.BoolValue(AUTO_PROVISIONING_KEY);
            }
            else
            {
                AutomaticProvisioning = true;
            }
        }