7

when validating my app, I get an error saying

"Improper Advertising Identifier Usage. Your app contains the Advertising Identifier [IDFA] API but you have not respecting the Limit Ad Tracking setting in iOS."

I have check "Yes" on the Prepare for Upload page for Advertising Identifier.I am using revmob ads and flurry analytics in my app(COCOS2D-X project).How to fix this issue, I have tried a lot but not succeed.I have use below code into appdelegate but no luck.

- (NSString *)identifierForAdvertising
{
   if([[ASIdentifierManager sharedManager] isAdvertisingTrackingEnabled])
   {
       NSUUID *IDFA = [[ASIdentifierManager sharedManager] advertisingIdentifier];

       return [IDFA UUIDString];
   }

    return nil;
}  

Screen Shot

Jojodmo
  • 23,357
  • 13
  • 65
  • 107
Ashok
  • 71
  • 1
  • 3
  • Make sure you updated to latest revmob and flurry. Also, I could make my app pass the new validation process by removing references to the AdSupport.framework (and setting status to "optional" in the build settings / Build Phases / link binary with Libraries) you can do that by replacing direct refs to ASIdentifierManager with NSClassFromString(@"ASIdentifierManager") It's just a work around though :( – Stephane Philipakis Apr 28 '14 at 17:15
  • Stephane thanks for info,i have already use updated sdk and do AdSupport.framework status optional but it's not working,issue remain same. – Ashok Apr 29 '14 at 05:10
  • Do you still have the code you pasted in your app delegate? You should not need it. – Stephane Philipakis Apr 29 '14 at 05:39
  • yes,i am using above code in app delegate.If i am not using this code in appdelegate "improper advertising identifier" issue still there. Recently apple have change "advertising identifier" in iTunes.I have read about this article in internet and implement as per below links. Link:- [1]http://stunningco.de/2014/04/13/what-is-the-advertising-identifier-idfa-on-ios-how-to-use-it-and-why-is-it-so-important/ [2]http://techcrunch.com/2014/04/11/apple-developers-must-now-agree-to-ad-identifier-rules-or-risk-app-store-rejection/ – Ashok Apr 29 '14 at 10:24
  • possible duplicate of [improper advertising identifier \[IDFA\] usage](http://stackoverflow.com/questions/22979151/improper-advertising-identifier-idfa-usage) – Andrew T. Sep 05 '14 at 05:55

3 Answers3

8

this IDFA issue was still happening for me today. I tracked it down to the GoogleAnalytics pod, so I just updated the pod to the latist version by specifying pod 'GoogleAnalytics-iOS-SDK', '~> 3.0.7' in the podfile which fixed the issue for me. the version was previously unspecified but was using 3.0.3.

Liam
  • 1,028
  • 13
  • 24
  • Thanks, I had the same problem. GoogleAnalytics 3.0.3 caused this warning. I updated to 3.0.7 and the warning disappeared. – ThomasCle May 15 '14 at 09:24
3

Around April 26th Apple changed their IDFA scanning procedures. Not only do you have to check the appropriate checkboxes after you click on the "prepare for upload", but your code (or any other third party library that you have must use IDFA by using the class directly.

Someone suggested to do this:

"you can do that by replacing direct refs to ASIdentifierManager with NSClassFromString(@"ASIdentifierManager")"

DO NOT load this class using this approach! New scanning procedure will look specifically for this and if it is found instead of direct references - Apple seems to assume that there is some strange usage of the tracking identifier. I can't say I disagree with that decision.

It may not be easy to find exactly which library is at fault. Latest AdMob SDK for example is using the class directly and is NOT the source of a problem.

One way you can find out which library is the source of the problem is to remove AdSupport.Framework from your project and see which libraries fail to link. Those libraries are NOT the problem. See if you have other advertising libraries that do not require you to include AdSupport.Framework - those are most likely the culprit.

It sounds a bit counter intuitive, but the direct referencing is not the problem, dynamic (weak) loading of that class is.

Hope this helps someone - we were pulling our hair out until we found what was the source of the issue.

djogon
  • 281
  • 2
  • 3
  • Wow so the apple's validation process was even more broken than I thought :) (I was the one suggesting the NSClassFromString work around). Thanks for your feedback! – Stephane Philipakis Apr 29 '14 at 21:35
  • They seems to have reversed the scanning and now simply require transparency when it comes to the IDFA usage. So even though one might check all the checkboxes required while submitting the binary, if the class is not used as a direct ref they reject the binary assuming that IDFA is used outside the boundaries set by those three checkbox options one gets when submitting a binary. – djogon Apr 30 '14 at 12:46
  • Your comment was useful, I ran a quick scan on my app, customizing the library to confirm whether the API gets called when Limit-Ad-Tracking is setup in iOS 7. I've used this basic code, but still Apple is sending a rejection mail -> NSString *advertiserId = @""; if ([[ASIdentifierManager sharedManager] isAdvertisingTrackingEnabled]) { ASIdentifierManager *advIdManager = [ASIdentifierManager sharedManager]; advertiserId = [[advIdManager advertisingIdentifier] UUIDString]; } – rishabh May 01 '14 at 14:26
0

Looks like Apple has reverted the changes now. All apps are going through just as usual again :)

rishabh
  • 1,155
  • 1
  • 10
  • 17
  • I didn't get the solution for IDFA yet,now when I am going to upload my app into iTunes, iTunes shows app status as "invalid binary".I think it was due to improper advertising identifier.Can anyone suggest to me how to fixed this issue so that I can upload app without any problem. – Ashok May 06 '14 at 05:36
  • Which Ad-network SDK are you using? You will need to select "display ads" option for IDFA, when making your app ready for Binary Upload. – rishabh May 07 '14 at 13:28