2

I have several targets in my project using the same codebase, but only some of them are supposed to use AppTrackingTransparency framework.

I imported it using a compiler directive:

#if TRANSPARENCY
import AppTrackingTransparency
#endif

Where TRANSPARENCY is added in Swift Compiler - Custom Flags/Other Swift Flags as -DTRANSPARENCY only for targets where it's needed.

The same directive is wrapping a piece of code that actually presents the permission dialog.

However one of the targets that does NOT import AppTrackingTransparency was rejected with a request:

Your app uses the AppTrackingTransparency framework, but we are unable to locate the App Tracking Transparency permission request. Please explain where we can find the App Tracking Transparency permission request in your app.

Did I miss something and AppTrackingTransparency is still being added in all targets? Is there a way to prevent it?

max.marauder
  • 141
  • 4
  • You're still linking it. The imports doesn't change that – Claus Jørgensen Aug 16 '21 at 08:21
  • @ClausJørgensen then what does actually make it to be linked? I didn't do anything else besides importing in order to use it. – max.marauder Aug 16 '21 at 08:26
  • Have you tried responding and explaining that this particular app doesn't use ATT, but it is linked in due to a shared module? – Paulw11 Aug 16 '21 at 11:16
  • @Paulw11 trying that right now, but regardless, I'm curious to know - how come that the framework is still linked to the app despite of being excluded by the compiler directive. – max.marauder Aug 16 '21 at 14:31

0 Answers0