1

I have to generate an unique ID for each device. Right now, I take device's unique ID with this way:

let uniqueStr = UIDevice.current.identifierForVendor?.uuidString

But in App Store Submission, this error come up:

Your app is using the Advertising Identifier (IDFA). You must either provide details about the IDFA usage or remove it from the app and submit your binary again.

My app has nothing to do with advertisement at all. Is there any way to get unique ID without getting this IDFA error?

Mahmut Acar
  • 713
  • 2
  • 7
  • 26
  • Have you added `AdSupport.framework` in your app? – Ankit Jayaswal Sep 11 '18 at 06:53
  • If the user uninstalls and then reinstalls the app to his device do you want the ID to be the same? – Aris Sep 11 '18 at 06:56
  • Are you sure `UIDevice.current.identifierForVendor?.uuidString` is causing the problem? DO you get any message from apple for it? By the way, you can check IDFA to yes also, with `Serve advertisements within the app` option uncheck. It means you have IDFA but not displaying ad, IDFA may be enabled due to the some 3rd party library you have used? for more detail https://segment.com/docs/sources/mobile/ios/quickstart/#step-5-submitting-to-the-app-store – Ankit Jayaswal Sep 11 '18 at 06:58
  • @AnkitJayaswal No, I didn't add AdSupport framework. – Mahmut Acar Sep 11 '18 at 07:02
  • @Aris Yes, it must be the same. – Mahmut Acar Sep 11 '18 at 07:03
  • @AnkitJayaswal No, I am not sure but I added this after previous submission. I also added 3rd party framework which can use IDFA. I'll ask to them if this isn't the cause. – Mahmut Acar Sep 11 '18 at 07:06
  • Possibly Related: https://stackoverflow.com/questions/31779092/how-do-i-check-where-my-app-is-using-idfa – Ahmad F Sep 11 '18 at 07:07
  • Are you using any adNetwork campaign in your app. Usually this adNetwork use Advertising Identifier (IDFA) and while submitting your app you need to mark it as a YES – Shruti Sep 11 '18 at 07:14
  • @Shruti No, I am not using adNetwork campaign. I guess 3rd party framework causes this. – Mahmut Acar Sep 11 '18 at 07:32

1 Answers1

0

It seems that apple throws this error when Advertising Identifier (IDFA) is being used not identifierForVendor.

It might be possible that some 3rd party library is using it. You can check for the actual reason for what or which framework using the IDFA from below stackoverflow answer:

How do I check where my app is using IDFA

Then,

  1. Either update your library accordingly or

  2. You can select using IDFA option while submitting the app.

Ankit Jayaswal
  • 5,549
  • 3
  • 16
  • 36
  • 1
    If you believe that the question is a duplicate, flag it as such. Adding an answer that simply references the duplicate isn't necessary. – Paulw11 Sep 11 '18 at 07:06