AppLovin / AppLovin-MAX-Unity-Plugin

110 stars 31 forks source link

Unlocalized Xcode Export #322

Closed shnktt closed 2 months ago

shnktt commented 4 months ago

MAX Plugin Version

6.1.2

Unity Version

2021.2.12f1

Device/Platform Info

iOS platform

Current Behavior

Despite enabling the 'Localize User Tracking Usage Description' option in the Integration Manager, the Xcode project is exported without localization.

Expected Behavior

When the 'Localize User Tracking Usage Description' is enabled, the Xcode project should be exported with appropriate localization settings applied.

How to Reproduce

  1. Enable 'Localize User Tracking Usage Description' in the Integration Manager.
  2. Build the project for iOS.
  3. Observe that the exported Xcode project lacks localization.

Additional Info

In MaxPostProcessBuildiOS.cs, the ShouldRemoveLocalization method returns true. It appears there is no instance where AppLovinSettings.Instance.UserTrackingUsageLocalizationEnabled is set to true, leading to this issue.

santoshbagadi commented 4 months ago

@shnktt Would you mind sharing a screenshot of your Integration Manager with the settings.

The AppLovinSettings.Instance.UserTrackingUsageLocalizationEnable setting gets updated for our old terms flow. The new flow uses a different settings.

shnktt commented 4 months ago

@santoshbagadi Thank you for your reply. Here's a screenshot of my Integration Manager.



This project was updated from version 5.11.2, where the Consent Flow was turned on, to the current version 6.1.2. The exported Xcode project does not contain AppLovinMAXResources.

santoshbagadi commented 4 months ago

Thank you for sharing the info. I see the issue. We'll fix it in the next release of our plugin.

In the meantime, you may update the MaxPostProcessBuildiOS.ShouldRemoveLocalization method to the following to fix the issue

        private static bool ShouldRemoveLocalization(string localizedUserTrackingDescription)
        {
            if (string.IsNullOrEmpty(localizedUserTrackingDescription)) return true;

            var settings = AppLovinSettings.Instance;
            var internalSettings = AppLovinInternalSettings.Instance;

            return (!internalSettings.ConsentFlowEnabled || !internalSettings.UserTrackingUsageLocalizationEnabled)
                   && (!settings.ConsentFlowEnabled || !settings.UserTrackingUsageLocalizationEnabled);
        }
shnktt commented 4 months ago

Thank you for providing the solution! I'm looking forward to the next release of the plugin.

santoshbagadi commented 2 months ago

We've released version 6.2.0 of our plugin that fixes this issue.