If you have been advised to remove the advertisingIdentifier or isAdvertisingTrackingEnabled selectors from the Unity SDK, you have two options.
Option 1 - Update to a recent version of Unity
This issue should now be resolved in all supported versions of Unity. Upgrade to one of the following versions or later:
- All versions of 2020.1 and 2020.2
Option 2 - Remove the specific selectors from the XCode project manually
If you are unable to upgrade to a new version of Unity, you can modify the XCode project generated by Unity to make the necessary changes.
- Open the file DeviceSettings.mm within your Xcode project.
- Find and remove the line
- Find and completely remove the function “QueryASIdentifierManager"
- Find the function "UnityAdvertisingIdentifier" and replace it with:
extern "C" const char* UnityAdvertisingIdentifier()
5. Find the function “UnityAdvertisingTrackingEnabled” and replace it with:
extern "C" int UnityAdvertisingTrackingEnabled()
Note: The process might vary slightly depending on the version of Unity. There is a walkthrough with similar steps available in the forums.
If you continue to use an older version of Unity, you will need to manually re-apply these edits each time you generate an XCode project. To make these changes permanent for all future builds, update the master template for this file:
On Mac OS:
If you continue to have issues, contact the Ads Support Team.
Article is closed for comments.