private static void UpdateJson(bool ignoreModificationDate, GenerateXmlFromGoogleServicesJson.LogMessage logMessageForNoConfigFiles = null, GenerateXmlFromGoogleServicesJson.LogMessage logMessageForMissingBundleId = null)
        {
            GenerateXmlFromGoogleServicesJson.ConfigFileType arg_3D_0 = GenerateXmlFromGoogleServicesJson.ConfigFileType.Json;
            string arg_3D_1 = null;

            GenerateXmlFromGoogleServicesJson.FindGoogleServicesFileMode arg_3D_2 = GenerateXmlFromGoogleServicesJson.FindGoogleServicesFileMode.ReturnBundleIdMatches;
            if (GenerateXmlFromGoogleServicesJson.f__mgcache4 == null)
            {
                GenerateXmlFromGoogleServicesJson.f__mgcache4 = new GenerateXmlFromGoogleServicesJson.LogMessage(GenerateXmlFromGoogleServicesJson.LogNoMessage);
            }
            GenerateXmlFromGoogleServicesJson.LogMessage arg_3D_3 = GenerateXmlFromGoogleServicesJson.f__mgcache4;
            if (GenerateXmlFromGoogleServicesJson.f__mgcache5 == null)
            {
                GenerateXmlFromGoogleServicesJson.f__mgcache5 = new GenerateXmlFromGoogleServicesJson.LogMessage(GenerateXmlFromGoogleServicesJson.LogNoMessage);
            }
            string text = GenerateXmlFromGoogleServicesJson.FindGoogleServicesFile(arg_3D_0, arg_3D_1, arg_3D_2, arg_3D_3, GenerateXmlFromGoogleServicesJson.f__mgcache5);

            GenerateXmlFromGoogleServicesJson.ConfigFileType arg_80_0 = GenerateXmlFromGoogleServicesJson.ConfigFileType.Plist;
            string arg_80_1 = null;

            GenerateXmlFromGoogleServicesJson.FindGoogleServicesFileMode arg_80_2 = GenerateXmlFromGoogleServicesJson.FindGoogleServicesFileMode.ReturnBundleIdMatches;
            if (GenerateXmlFromGoogleServicesJson.f__mgcache6 == null)
            {
                GenerateXmlFromGoogleServicesJson.f__mgcache6 = new GenerateXmlFromGoogleServicesJson.LogMessage(GenerateXmlFromGoogleServicesJson.LogNoMessage);
            }
            GenerateXmlFromGoogleServicesJson.LogMessage arg_80_3 = GenerateXmlFromGoogleServicesJson.f__mgcache6;
            if (GenerateXmlFromGoogleServicesJson.f__mgcache7 == null)
            {
                GenerateXmlFromGoogleServicesJson.f__mgcache7 = new GenerateXmlFromGoogleServicesJson.LogMessage(GenerateXmlFromGoogleServicesJson.LogNoMessage);
            }
            string text2 = GenerateXmlFromGoogleServicesJson.FindGoogleServicesFile(arg_80_0, arg_80_1, arg_80_2, arg_80_3, GenerateXmlFromGoogleServicesJson.f__mgcache7);

            if (text != null)
            {
                GenerateXmlFromGoogleServicesJson.GenerateXmlResources(text, ignoreModificationDate);
            }
            bool flag = text != null || text2 != null;

            if (EditorUserBuildSettings.selectedBuildTargetGroup == (BuildTargetGroup)1 && !flag)
            {
                GenerateXmlFromGoogleServicesJson.ConfigFileType arg_F2_0 = GenerateXmlFromGoogleServicesJson.ConfigFileType.Any;
                string arg_F2_1 = null;
                GenerateXmlFromGoogleServicesJson.FindGoogleServicesFileMode arg_F2_2 = GenerateXmlFromGoogleServicesJson.FindGoogleServicesFileMode.ReturnAll;
                if (GenerateXmlFromGoogleServicesJson.f__mgcache8 == null)
                {
                    GenerateXmlFromGoogleServicesJson.f__mgcache8 = new GenerateXmlFromGoogleServicesJson.LogMessage(GenerateXmlFromGoogleServicesJson.LogNoMessage);
                }
                GenerateXmlFromGoogleServicesJson.LogMessage arg_F2_3 = GenerateXmlFromGoogleServicesJson.f__mgcache8;
                if (GenerateXmlFromGoogleServicesJson.f__mgcache9 == null)
                {
                    GenerateXmlFromGoogleServicesJson.f__mgcache9 = new GenerateXmlFromGoogleServicesJson.LogMessage(GenerateXmlFromGoogleServicesJson.LogNoMessage);
                }
                string text3 = GenerateXmlFromGoogleServicesJson.FindGoogleServicesFile(arg_F2_0, arg_F2_1, arg_F2_2, arg_F2_3, GenerateXmlFromGoogleServicesJson.f__mgcache9);
                if (text3 != null)
                {
                    if (GenerateXmlFromGoogleServicesJson.IsFileOfType(text3, GenerateXmlFromGoogleServicesJson.ConfigFileType.Json))
                    {
                        text = text3;
                    }
                    else if (GenerateXmlFromGoogleServicesJson.IsFileOfType(text3, GenerateXmlFromGoogleServicesJson.ConfigFileType.Plist))
                    {
                        text2 = text3;
                    }
                    flag = (text != null || text2 != null);
                }
            }
            if (flag)
            {
                BuildTargetGroup selectedBuildTargetGroup = EditorUserBuildSettings.selectedBuildTargetGroup;
                // IL_158:
                switch ((int)selectedBuildTargetGroup)
                {
                case 1:
                    goto IL_187;

                case 2:
                case 3:
IL_158:
                    if ((int)selectedBuildTargetGroup != 7)
                    {
                        goto IL_187;
                    }
                    goto IL_187;

                case 4:
                    if (text2 != null)
                    {
                        GenerateXmlFromGoogleServicesJson.CreateDesktopJsonFromPlist(text2);
                    }
                    else if (text != null)
                    {
                        GenerateXmlFromGoogleServicesJson.CreateDesktopJsonFromJson(text);
                    }
                    goto IL_1A9;

                default:
                    goto IL_158;
                }
IL_187:
                if (text != null)
                {
                    GenerateXmlFromGoogleServicesJson.CreateDesktopJsonFromJson(text);
                }
                else if (text2 != null)
                {
                    GenerateXmlFromGoogleServicesJson.CreateDesktopJsonFromPlist(text2);
                }
                IL_1A9 :;
            }
            else
            {
                Debug.LogWarning(DocStrings.DocRef.CouldNotFindPlistOrJson.Format(new object[0]));
                GenerateXmlFromGoogleServicesJson.LogMessage arg_1E5_0;
                if ((arg_1E5_0 = logMessageForNoConfigFiles) == null)
                {
                    if (GenerateXmlFromGoogleServicesJson.f__mgcacheA == null)
                    {
                        GenerateXmlFromGoogleServicesJson.f__mgcacheA = new GenerateXmlFromGoogleServicesJson.LogMessage(GenerateXmlFromGoogleServicesJson.LogErrorIfEnabled);
                    }
                    arg_1E5_0 = GenerateXmlFromGoogleServicesJson.f__mgcacheA;
                }
                logMessageForNoConfigFiles = arg_1E5_0;
                logMessageForNoConfigFiles(DocStrings.DocRef.GoogleServicesFileBundleIdMissing.Format(new object[]
                {
                    UnityCompat.ApplicationId,
                    ((int)EditorUserBuildSettings.selectedBuildTargetGroup != 4) ? "google-services.json" : "GoogleService-Info.plist",
                    string.Join("\n", GenerateXmlFromGoogleServicesJson.BundleIdsFromBundleIdsByConfigFile(GenerateXmlFromGoogleServicesJson.ConfigFileDirectory).ToArray()),
                    DocStrings.Link.AndroidAddApp
                }));
            }
        }