public void OnPreprocessBuild(BuildReport report)
        {
            // Clean and reset settings before builds to make sure we don't
            // pollute later builds with assets that may be unnecessary or are outdated.
            CleanOldSettings();

            AppleLoaderSettings settings = AppleLoader.GetSettings();

            if (settings == null)
            {
                return;
            }

            UnityEngine.Object[] preloadedAssets = PlayerSettings.GetPreloadedAssets();
            if (!preloadedAssets.Contains(settings))
            {
                var assets = preloadedAssets.ToList();
                assets.Add(settings);
                PlayerSettings.SetPreloadedAssets(assets.ToArray());
            }
        }
        internal void AddSignInWithAppleActivity()
        {
            XmlElement activity = CreateElement("activity");

            activity.Attributes.Append(CreateAndroidAttribute("name",
                                                              "com.unity3d.playeridentity.SignInWithAppleIntentFilter"));
            activity.Attributes.Append(CreateAndroidAttribute("theme", "@android:style/Theme.Translucent.NoTitleBar"));
            activity.Attributes.Append(CreateAndroidAttribute("noHistory", "true"));
            activity.Attributes.Append(CreateAndroidAttribute("launchMode", "singleTask"));

            XmlElement intentFilter = CreateElement("intent-filter");

            activity.AppendChild(intentFilter);

            XmlElement data        = CreateElement("data");
            var        settings    = AppleLoader.GetSettings();
            var        deepLinkUri = new Uri(settings.m_ApplicationDeepLink);

            data.Attributes.Append(CreateAndroidAttribute("scheme", deepLinkUri.Scheme));
            data.Attributes.Append(CreateAndroidAttribute("host", deepLinkUri.Host));
            intentFilter.AppendChild(data);

            XmlElement action = CreateElement("action");

            action.Attributes.Append(CreateAndroidAttribute("name", "android.intent.action.VIEW"));
            intentFilter.AppendChild(action);

            XmlElement category1 = CreateElement("category");

            category1.Attributes.Append(CreateAndroidAttribute("name", "android.intent.category.DEFAULT"));
            intentFilter.AppendChild(category1);

            XmlElement category2 = CreateElement("category");

            category2.Attributes.Append(CreateAndroidAttribute("name", "android.intent.category.BROWSABLE"));
            intentFilter.AppendChild(category2);

            m_ApplicationElement.AppendChild(activity);
        }