IDFA for iOS app running on Mac

I've been trying to access IDFA for the iOS app running on Mac with M1 CPU and it seems to always return 00000000-0000-0000-0000-000000000000 - even though the changes for App Tracking Transparency framework had not been there yet by the moment I tried it.

Moreover, when I try to request authorization for app tracking with requestTrackingAuthorization, it simply doesn't show the dialog, and the AuthorizationStatus is always Authorized.

Can someone please clarify whether the app tracking even supported for iOS-on-mac? I would personally expect it to work and provide access to the IDFA of the host Mac machine.

P.S. I know simulators also return zeroes (there's a similar thread on this topic) - can the reason be same?
Your issue is that you are running on emulator, i had this issue too until i found this documentation which state that on emulator the IDFA will always be 00000000-0000-0000-0000-000000000000 regardless of the permission status
Well, I'm not really running on either emulator or simulator. Sorry if it's not clear from my initial post - I run iOS app on Mac with M1 CPU, they can do it natively.
But the documentation also says the following:

The advertising identifier returns all zeros (00000000-0000-0000-0000-000000000000) in the following cases:

  • ...

  • When you call this API on a device running macOS.

So I believe this is the case. Although the documentation might have been more explicit on this point, because it is not obvious (maybe just for me) that you should take into account macOS behavior in iOS app.


IDFA for iOS app running on Mac
 
 
Q