private static void UpdateJsonWithBundleIdChooserDialog(string bundleId, bool ignoreModificationDate)
        {
            GenerateXmlFromGoogleServicesJson.ConfigFileType configFileType;
            if ((int)EditorUserBuildSettings.selectedBuildTargetGroup == 7)
            {
                configFileType = GenerateXmlFromGoogleServicesJson.ConfigFileType.Json;
            }
            else
            {
                if ((int)EditorUserBuildSettings.selectedBuildTargetGroup != 4)
                {
                    return;
                }
                configFileType = GenerateXmlFromGoogleServicesJson.ConfigFileType.Plist;
            }
            GenerateXmlFromGoogleServicesJson.ConfigFileType             arg_62_0 = configFileType;
            GenerateXmlFromGoogleServicesJson.FindGoogleServicesFileMode arg_62_2 = GenerateXmlFromGoogleServicesJson.FindGoogleServicesFileMode.ReturnBundleIdMatches;
            if (GenerateXmlFromGoogleServicesJson.f__mgcacheE == null)
            {
                GenerateXmlFromGoogleServicesJson.f__mgcacheE = new GenerateXmlFromGoogleServicesJson.LogMessage(GenerateXmlFromGoogleServicesJson.LogNoMessage);
            }
            GenerateXmlFromGoogleServicesJson.LogMessage arg_62_3 = GenerateXmlFromGoogleServicesJson.f__mgcacheE;
            if (GenerateXmlFromGoogleServicesJson.f__mgcacheF == null)
            {
                GenerateXmlFromGoogleServicesJson.f__mgcacheF = new GenerateXmlFromGoogleServicesJson.LogMessage(GenerateXmlFromGoogleServicesJson.LogNoMessage);
            }
            if (GenerateXmlFromGoogleServicesJson.FindGoogleServicesFile(arg_62_0, bundleId, arg_62_2, arg_62_3, GenerateXmlFromGoogleServicesJson.f__mgcacheF) != null || UnityCompat.InBatchMode)
            {
                GenerateXmlFromGoogleServicesJson.UpdateJson(UnityCompat.InBatchMode, null, null);
                return;
            }
            List <string> list = GenerateXmlFromGoogleServicesJson.BundleIdsFromBundleIdsByConfigFile(GenerateXmlFromGoogleServicesJson.ConfigFileDirectory);

            if (GenerateXmlFromGoogleServicesJson.spamguard || list.Count == 0)
            {
                return;
            }
            ChooserDialog.Show("请修复您的Bundle ID  大哥!!", "从Firebase配置中选择一个有效的Bundle ID", string.Format("您的捆绑包ID {0}不存在于您的FialBasic配置中。不匹配的捆绑ID会导致应用程序无法初始化。", bundleId), list.ToArray(), 0, "Apply", "Cancel", delegate(string selectedBundleId) {
                if (!string.IsNullOrEmpty(selectedBundleId))
                {
                    UnityCompat.ApplicationId = selectedBundleId;
                }
                else
                {
                    GenerateXmlFromGoogleServicesJson.spamguard = true;
                }
                GenerateXmlFromGoogleServicesJson.UpdateJson(true, null, null);
            });
            //ChooserDialog.Show("Please fix your Bundle ID", "Select a valid Bundle ID from your Firebase configuration.", string.Format("Your bundle ID {0} is not present in your Firebase configuration.  A mismatched bundle ID will result in your application to fail to initialize.\n\nNew Bundle ID:", bundleId), list.ToArray(), 0, "Apply", "Cancel", delegate (string selectedBundleId) {
            //    if (!string.IsNullOrEmpty(selectedBundleId)) {
            //        UnityCompat.ApplicationId = selectedBundleId;
            //    } else {
            //        GenerateXmlFromGoogleServicesJson.spamguard = true;
            //    }
            //    GenerateXmlFromGoogleServicesJson.UpdateJson(true, null, null);
            //});
        }
        private static void CheckConfiguration()
        {
            Delegate arg_22_0 = EditorApplication.update;

            if (GenerateXmlFromGoogleServicesJson.f__mgcacheB == null)
            {
                GenerateXmlFromGoogleServicesJson.f__mgcacheB = new EditorApplication.CallbackFunction(GenerateXmlFromGoogleServicesJson.CheckConfiguration);
            }
            EditorApplication.update = (EditorApplication.CallbackFunction)Delegate.Remove(arg_22_0, GenerateXmlFromGoogleServicesJson.f__mgcacheB);
            GenerateXmlFromGoogleServicesJson.UpdateConfigFileDirectory();
            if (GenerateXmlFromGoogleServicesJson.XMLGenerationEnabled)
            {
                GenerateXmlFromGoogleServicesJson.UpdateJsonWithBundleIdChooserDialog(UnityCompat.ApplicationId, false);
            }
            else
            {
                GenerateXmlFromGoogleServicesJson.UpdateJson(false, null, null);
            }
        }
        private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromPath)
        {
            Debug.Log("oooooooooooooooooooooo");
            bool flag = false;

            for (int i = 0; i < importedAssets.Length; i++)
            {
                string path     = importedAssets[i];
                string fileName = Path.GetFileName(path);
                if (fileName == GenerateXmlFromGoogleServicesJson.google_services_input_file || fileName == GenerateXmlFromGoogleServicesJson.google_service_info_input_file)
                {
                    flag = true;
                    break;
                }
            }
            for (int j = 0; j < deletedAssets.Length; j++)
            {
                string a = deletedAssets[j];
                if (a == GenerateXmlFromGoogleServicesJson.google_services_desktop_output_path)
                {
                    flag = true;
                    break;
                }
            }
            for (int k = 0; k < movedAssets.Length; k++)
            {
                string a2 = movedAssets[k];
                if (a2 == GenerateXmlFromGoogleServicesJson.google_services_desktop_output_path)
                {
                    flag = true;
                    break;
                }
            }
            if (flag)
            {
                GenerateXmlFromGoogleServicesJson.UpdateConfigFileDirectory();
                GenerateXmlFromGoogleServicesJson.spamguard = false;
                GenerateXmlFromGoogleServicesJson.UpdateJson(true, null, null);
            }
        }
 public static void ForceJsonUpdate(bool canPromptToChangePackageId = false)
 {
     GenerateXmlFromGoogleServicesJson.spamguard = !canPromptToChangePackageId;
     GenerateXmlFromGoogleServicesJson.UpdateConfigFileDirectory();
     GenerateXmlFromGoogleServicesJson.UpdateJson(true, null, null);
 }