private static void ShowGoogleNetworkAdaptersUpdateDialogIfNeeded(Network[] networks) { // AdMob and GAM use the same SDKs so their adapters should use the same underlying SDK version. var googleNetwork = networks.FirstOrDefault(network => network.Name.Equals("ADMOB_NETWORK")); var googleAdManagerNetwork = networks.FirstOrDefault(network => network.Name.Equals("GOOGLE_AD_MANAGER_NETWORK")); // If both AdMob and GAM are not integrated, do nothing. if (googleNetwork == null || string.IsNullOrEmpty(googleNetwork.CurrentVersions.Unity) || googleAdManagerNetwork == null || string.IsNullOrEmpty(googleAdManagerNetwork.CurrentVersions.Unity)) { return; } var isAndroidVersionCompatible = GoogleNetworkAdaptersCompatible(googleNetwork.CurrentVersions.Android, googleAdManagerNetwork.CurrentVersions.Android, "19.8.0.0"); var isIosVersionCompatible = GoogleNetworkAdaptersCompatible(googleNetwork.CurrentVersions.Ios, googleAdManagerNetwork.CurrentVersions.Ios, "8.0.0.0"); if (isAndroidVersionCompatible && isIosVersionCompatible) { return; } var message = "You may see unexpected errors if you use different versions of the AdMob and Google Ad Manager adapter SDKs. " + "AdMob and Google Ad Manager share the same SDKs.\n\n" + "You can be sure that you are using the same SDK for both if the first three numbers in each adapter version match."; AppLovinIntegrationManager.ShowBuildFailureDialog(message); }
private static void ShowNetworkAdaptersUpdateDialogIfNeeded(Network[] networks) { var networksToUpdate = networks.Where(network => network.RequiresUpdate).ToList(); // If all networks are above the required version, do nothing. if (networksToUpdate.Count <= 0) { return; } // We found a few adapters that are not compatible with the current SDK, show alert. var message = "The following network adapters are not compatible with the current version of AppLovin MAX Plugin:\n"; foreach (var networkName in networksToUpdate) { message += "\n- "; message += networkName.DisplayName + " (Requires " + MinAdapterVersions[networkName.Name] + " or newer)"; } message += "\n\nPlease update them to the latest versions to avoid any issues."; AppLovinIntegrationManager.ShowBuildFailureDialog(message); }