Build 2013.1095 - iosAdvertisingIdentifier nil?

I’m updating my games removing the UDIDs. I’m using build 1095.

All these new functions return nil for me.

  • system.getInfo( “iosAdvertisingIdentifier” )
  • system.getInfo( “iosAdvertisingTrackingEnabled” )
  • system.getInfo( “iosIdentifierForVendor” )

Am I the only one?

They work fine for me (using build 1101 at the moment).  Are you testing them on an actual iOS device running iOS 6.0 or higher?  Naturally, they’ll be nil for lower iOS versions and on Android devices and in the Corona Simulator.

  • Andrew

I tested on an iPhone 4 running iOS 6.1.3

I’m going to test a higher build and see if it will work.

It’s a corona bug on system.getInfo( “iosAdvertisingTrackingEnabled” )

This returns nil, instead of true/false.

http://www.coronalabs.com/blog/2013/04/30/new-system-info-properties/ in the comment section Paulo encountered this error too.

In corona official api these new parameters are not detailed, and don’t say if this should return nil/true. But it would make sense to return true/false.

I agree the Corona documentation could perhaps provide a little more detail, but I don’t consider this at a bug at all.

iosAdvertisingTrackingEnabled corresponds directly to the advertisingTrackingEnabled flag the Apple documents here: https://developer.apple.com/library/ios/#documentation/AdSupport/Reference/ASIdentifierManager_Ref/ASIdentifierManager.html#//apple_ref/occ/cl/ASIdentifierManager.  Thus, it makes sense to me that system.getInfo(“iosAdvertisingTrackingEnabled”) will return true/false if run on iOS 6, and nil on lower versions of iOS (where the flag doesn’t even exist).  And similarly for system.getInfo(“iosAdvertisingIdentifier”).

Another way to say it is that “iosAdvertisingTrackingEnabled” doesn’t mean “Does this device support the new IDFA?”, it means “Assuming this device supports the new IDFA, does the user allow advertising tracking?”

  • Andrew

EDIT: Actually, I haven’t used iosAdvertisingTrackingEnabled myself yet, only iosAdvertisingIdentifier.  So it’s quite possible that iosAdvertisingTrackingEnabled is still a bug and returning nil all the time.  All I know is that iosAdvertisingIdentifier is returning a value when I expect it to.

I totally agree with what you say.

And it returns nil on iOS 6.1.3.

I submitted a bug request to Corona.

They work fine for me (using build 1101 at the moment).  Are you testing them on an actual iOS device running iOS 6.0 or higher?  Naturally, they’ll be nil for lower iOS versions and on Android devices and in the Corona Simulator.

  • Andrew

I tested on an iPhone 4 running iOS 6.1.3

I’m going to test a higher build and see if it will work.

It’s a corona bug on system.getInfo( “iosAdvertisingTrackingEnabled” )

This returns nil, instead of true/false.

http://www.coronalabs.com/blog/2013/04/30/new-system-info-properties/ in the comment section Paulo encountered this error too.

In corona official api these new parameters are not detailed, and don’t say if this should return nil/true. But it would make sense to return true/false.

I agree the Corona documentation could perhaps provide a little more detail, but I don’t consider this at a bug at all.

iosAdvertisingTrackingEnabled corresponds directly to the advertisingTrackingEnabled flag the Apple documents here: https://developer.apple.com/library/ios/#documentation/AdSupport/Reference/ASIdentifierManager_Ref/ASIdentifierManager.html#//apple_ref/occ/cl/ASIdentifierManager.  Thus, it makes sense to me that system.getInfo(“iosAdvertisingTrackingEnabled”) will return true/false if run on iOS 6, and nil on lower versions of iOS (where the flag doesn’t even exist).  And similarly for system.getInfo(“iosAdvertisingIdentifier”).

Another way to say it is that “iosAdvertisingTrackingEnabled” doesn’t mean “Does this device support the new IDFA?”, it means “Assuming this device supports the new IDFA, does the user allow advertising tracking?”

  • Andrew

EDIT: Actually, I haven’t used iosAdvertisingTrackingEnabled myself yet, only iosAdvertisingIdentifier.  So it’s quite possible that iosAdvertisingTrackingEnabled is still a bug and returning nil all the time.  All I know is that iosAdvertisingIdentifier is returning a value when I expect it to.

I totally agree with what you say.

And it returns nil on iOS 6.1.3.

I submitted a bug request to Corona.

nil here in todays build & 6.1.3

This code works fine for me in 2013.1154 on both the iOS Simulator and a 6.1.4 iPhone 5:

print("iosAdvertisingIdentifier: ", system.getInfo("iosAdvertisingIdentifier")) print("iosAdvertisingTrackingEnabled: ", tostring(system.getInfo("iosAdvertisingTrackingEnabled"))) print("iosIdentifierForVendor: ", system.getInfo("iosIdentifierForVendor"))

yielding:

Jul 2 17:35:48 Perrys-iPhone bug-22307[13732] \<Warning\>: iosAdvertisingIdentifier: B2884EFE-3D9F-446B-8DD5-1968A5D140BE Jul 2 17:35:48 Perrys-iPhone bug-22307[13732] \<Warning\>: iosAdvertisingTrackingEnabled: true Jul 2 17:35:48 Perrys-iPhone bug-22307[13732] \<Warning\>: iosIdentifierForVendor: 90EE3F07-7F3C-44DA-B67C-DED203C16F78

If it’s not working for you, file a bug which includes a reproducible case.

I looked at the test case supplied with the bug report and it’s calling the system.getInfo API with the wrong string.

"advertisingIdentifier"instead of “iosAdvertisingIdentifier”.

nil here in todays build & 6.1.3

This code works fine for me in 2013.1154 on both the iOS Simulator and a 6.1.4 iPhone 5:

print("iosAdvertisingIdentifier: ", system.getInfo("iosAdvertisingIdentifier")) print("iosAdvertisingTrackingEnabled: ", tostring(system.getInfo("iosAdvertisingTrackingEnabled"))) print("iosIdentifierForVendor: ", system.getInfo("iosIdentifierForVendor"))

yielding:

Jul 2 17:35:48 Perrys-iPhone bug-22307[13732] \<Warning\>: iosAdvertisingIdentifier: B2884EFE-3D9F-446B-8DD5-1968A5D140BE Jul 2 17:35:48 Perrys-iPhone bug-22307[13732] \<Warning\>: iosAdvertisingTrackingEnabled: true Jul 2 17:35:48 Perrys-iPhone bug-22307[13732] \<Warning\>: iosIdentifierForVendor: 90EE3F07-7F3C-44DA-B67C-DED203C16F78

If it’s not working for you, file a bug which includes a reproducible case.

I looked at the test case supplied with the bug report and it’s calling the system.getInfo API with the wrong string.

"advertisingIdentifier"instead of “iosAdvertisingIdentifier”.