iOS Build Environment Help Center

How to remove “ASIdentifierManager” ?

append delete Manuel

Apple rejects the game due to this identifier unity puts on Xcode project, apparently. But I can't figure it out how to remove it from windows... seems to be possible using Xcode on a mac.. I guess... Any clues?? Thanks!

Apple mail:
Your app includes third-party analytics or third-party advertising with the ability to collect, transmit or share identifiable information, including, for example, IDFA. We found that your app references the ASIdentifierManager API, which provides access to a user's IDFA, in the following location(s) in your binary:

• Frameworks/UnityFramework.framework/UnityFramework

It would be appropriate to remove all instances of “ASIdentifierManager” from your app, even if they are not utilized in your app's functionality.

Reply RSS

Replies

append delete #1. Pierre-Marie Baty

Hello

ASIdentifierManager is not "an identifier that Unity puts on Xcode project", but a core part of Apple's AdSupport framework for iOS. See https://developer.apple.com/documentation/adsupport/asidentifiermanager

I don't believe this is the reason of the rejection. I understand "It would be appropriate" like an invitation to do something and not an obligation.

It would be illogical that Apple refuse an app that use their own ad technology, so if your app isn't accepted, it's probably that something is missing on your end (for example, the ad configuration isn't configured at all).

If your app uses *no* ads at all, then it makes sense to not include megabytes of unused ad tech code in your app indeed. This would produce cleaner and smaller code. But how to achieve that (i.e. not constructing a Xcode project that rely on it) would be a question to ask the Unity support.

When you say "seems to be possible using Xcode on a mac", do you have a link that explains how to do that with Xcode ? I can maybe help you translate these instructions builder-wise.

append delete #2. Manuel

Hi!

Thanks for your answer. I use ads. I had the same rejection before adding the Apple's AdSupport framework package (I installed thinking it may help) and after deleting it again.

I think It maybe editable in a mac using Xcode because I see a file in build\Release-iphoneos\UnityFramework\UnityFramework.framework I forced to open it with Visual Studio, and it looks like a chaotic matrix with numbers and a column with text in which I can see reference of "ASIdentifierManager". But now I realize that this file shows up after building the app in the IosBuilder tool, so there should be a way to prevent unity from adding the instructions that makes that ending up in the build.

I am not an experienced programmer at all, so it's very likely should have much cleaner code, but I saw a lot of people with this problem for many reasons, so it looks like it doesn't have to do with ads (or maybe it does, who knows).

I'm a bit lost but I'll keep investigating
Thanks!

append delete #3. Pierre-Marie Baty

That file called "UnityFramework.framework" in the Build folder is the *compiled* (i.e. *binary*) version of the Unity framework, which contains the game engine and all your game logic. Almost everything you create in the Unity editor ends up in this file, and the process that creates it is called _compilation_. At the end of the build process, you can see that file like a big DLL that your game app will load upon startup when it is launched on iOS. And that chaotic matrix you see if you force-open it in Visual Studio is just the hexadecimal representation of its binary data.

You seem to be unfamiliar with the basic concepts of compilation. I will provide a simplified explanation but I consider each user of any build system (whichever one it is) should know these basics.

At the beginning of the process you have source code, i.e. text files containing quasi-english keywords with lots of parentheses, square brackets and mathematical expressions. That is your program. This source code describes the program logic. You feed these files to a compiler which will produce *object* code, that is to say, the binary representation of that logic in specific machine instructions for the very machine type on which you intend to run the program. In your situation the compiler takes your source code files, and produces binary files (one for each source file) containing bytes that the CPUs that are inside iOS devices can understand and execute as valid binary instructions. The next step is to merge all those files together. That is called "linking" them. We call for this a program called a "linker" that will take all those object files, concatenate them and adjust the relative offsets it can find in each of them so that they all point at each other correctly, then add a program loader prefix in a platform-specific format (on Windows it's "PE", on macOS/iOS it's "Mach-O"). At this point, the linker has produced either an executable program (ending in .exe on Windows, or with no particular extension on other platforms, such as your main iOS game executable), or a dynamically loadable library or framework that's roughly a DLL with embedded resources (as is the case here with that Unity framework).

No programmer in its right mind would "edit" a file past the compilation stage to fix things, so don't even try to touch that UnityFramework.framework file in a hex editor. Except for highly skilled people, these files are untranslatable. The sane way to fix stuff is to edit the source code so as to change the game logic, and rebuild it all so that the new game logic is compiled and linked in a new executable that behaves in the appropriate way.

And since with Unity the source code itself is automatically generated by the Unity editor (that's the core of their business: they promise non-programmers they can create games because the Unity editor will literally *write the platform-specific code on their behalf*), you have to fix it one step above, i.e. in the Unity editor itself.

If you scoured all places in the Unity editor and found nothing to fix, maybe it's a known problem with that version of the editor, and you could consider upgrading to a newer version of Unity.

Good luck, I honestly don't know how I could help you beyond that point.

append delete #4. Manuel

"You seem to be unfamiliar with the basic concepts of compilation. I will provide a simplified explanation..." True and thanks! :)

"they promise non-programmers they can create games because the Unity editor will literally *write the platform-specific code on their behalf*" hahahah Yeeep

"If you scoured all places in the Unity editor and found nothing to fix, maybe it's a known problem with that version of the editor, and you could consider upgrading to a newer version of Unity." I did.

Thanks for the explanation. I managed to publish two games on IOS with your tool which is really great btw. I just was wondering if someone had like a similar experience can relate with, and give me a "magic tip"
I'll try to post how I end up solving this (if I do) Thanks!
Happy 2022!

append delete #5. Pierre-Marie Baty

You're welcome.

FYI I made some search myself and I confirm it is a Unity editor issue.

https://forum.unity.com/threads/appstore-rejects-kids-app-due-asidentifiermanager.1038610/

In a nutshell, Unity incorrectly generates code that includes

%
#include <Adsupport/AsIdentifierManager.h>
%

and calls

%
QueryASIdentifierManager()
%

when the app doesn't really need it, which is rightfully seen as a bad practice by Apple.

To replicate the solution proposed by the user in the above thread on the Unity forums, in the absence of a proper fix by the Unity team themselves, you should look for these strings in the source code generated by Unity (i.e. in the *.c/*.cpp/*.m/*.mm and *.h/*.hpp files that it creates) and comment out every occurence of them. *WARNING*: some basic knowledge of the Objective-C programming language is very likely to be involved so that your changes are syntactically correct and can be compiled successfully.

Happy 2022,

:: @Pierre-Marie Baty added on 02 Jan ’22 · 13:50

Another comparable workaround is proposed on StackOverflow here: https://stackoverflow.com/questions/60651863/how-to-remove-isadvertisingtrackingenabled-in-unity

append delete #6. Manuel

UPDATE
I tried everything, but apple still complained. I guy from Apple support called me and said he would try to get more details about my case but, for my surprise, the app appeared "In review" and then got approved. Just like that.

I read this: "I think i know what the problem is. In the way of finding out where the ASIdentifierManager is used, i found the file "OpenQuickly-ReferencedFrameworks.index-v1" it is created during the Archive proces of the iOS app." here https://groups.google.com/g/google-admob-ads-sdk/c/Mvv738dT1i8

I don't know....
Anyway, thanks a lot for your attention and support!

append delete #7. Pierre-Marie Baty

Glad to know it’s sorted out.

The App Store uses a lot of automated tools that dissect your ipa and flag it for whatever reason. I guess yours was causing an edge case that was a false positive. They eventually realized it.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Moderators: Pierre-Marie Baty