how to deal with : testDeviceIdentifiers = @[ <private> ];

To test admob and Google UMP i need to obtain device identifier and pass to relevant call.

But, when I look for testDeviceIdentifiers in the macos Console app I see it prints this:

testDeviceIdentifiers = @[ <private> ];

it seems to hide the device id for privacy reasons.
For android I obtained it easily.

Is this what you use ? This suggestion is from 7 years ago.

Everybody , you had to do this too ?

I haven’t added an iOS test device to admob, but I have had to unredact private logging on macos before. It might have been close to 7 years ago I had to do that, but no, the first accepted answer there no longer works. The second one from 2020 is likely still applicable.
You could also just download or write a small app to get your ad id.

I tried the second solution and it still redacts the device id

<Google> To get test ads on this device, set: 
	GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [ "<private>" ]

I tried your second suggestion of using app for getting ad id, the IDFA it gives looks like this : 7AC7B1A6-20A3-4CA3-AEE5-644E9603C807

while Android gives some kind of hash like this:ABB0E32DE3F194183CACCB09D7ACB0E7

Anyway, when I pass the IDFA that these apps give as testDeviceIdentifiers it doesn’t work for iphone.

maybe I need to apply some hash on the IDFA ?

Can anybody who uses device to test Google UMP or admob tell me how he got the device test id for their iphone ?

I don’t think it’s unexpected that the google AD ID and apple IDFA are expected to have a different format - they aren’t actually the same thing, but it looks like you are correct that google wants a hash of the IDFA passed in: swift - Identify the test device for Admob - Stack Overflow

You could also try running in XCode to get the console output rather than use the console app. I can’t recall having ever seen redacted log output in XCode. I could be wrong about that, but it might be worth a shot anyway. (You don’t need to build in XCode. As long as you have a project open that has an iOS target, you can use Attach to Process, give it your process id and then launch and it should connect the debugger once the app starts running).

You could also try entering the test device(s) via the Admob account settings rather than programatically. That might take the IDFA as is without needing to hash it.

1 Like