简体   繁体   English

当我在xCode 5中验证我的应用程序时,获取错误不正确的广告标识符[IDFA]用法

[英]Getting error improper advertising identifier [IDFA] usage,when i am validating my app in xCode 5

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." “广告标识符使用不当。您的应用包含广告标识符[IDFA] API,但您尚未遵守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. 我在广告标识符的准备上传页面上检查了“是”。我在我的应用程序中使用revmob广告和flurry分析(COCOS2D-X项目)。如何解决这个问题,我已经尝试了很多但没有成功。我使用下面的代码进入appdelegate但没有运气。

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

       return [IDFA UUIDString];
   }

    return nil;
}  

屏幕截图

this IDFA issue was still happening for me today. 这个IDFA问题今天仍在我身上发生。 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. 我将其跟踪到GoogleAnalytics pod ,所以我只是通过在podfile中指定pod'GoogleAnalytics pod 'GoogleAnalytics-iOS-SDK', '~> 3.0.7'来更新pod到latist版本,这为我解决了问题 the version was previously unspecified but was using 3.0.3. 该版本以前未指定,但使用的是3.0.3。

Around April 26th Apple changed their IDFA scanning procedures. 4月26日左右,Apple改变了他们的IDFA扫描程序。 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. 单击“准备上载”后,您不仅需要选中相应的复选框,而且您的代码(或您拥有的任何其他第三方库必须直接使用该类才能使用IDFA)。

Someone suggested to do this: 有人建议这样做:

"you can do that by replacing direct refs to ASIdentifierManager with NSClassFromString(@"ASIdentifierManager")" “你可以通过用NSClassFromString(@”ASIdentifierManager“)将直接引用替换为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. 新的扫描程序将专门针对此进行查找,如果找到它而不是直接引用 - Apple似乎认为跟踪标识符有一些奇怪的用法。 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. 例如,最新的AdMob SDK直接使用该类,而不是问题的根源。

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. 您可以找到哪个库是问题根源的一种方法是从项目中删除AdSupport.Framework并查看哪些库无法链接。 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. 看看您是否有其他广告库不要求您包含AdSupport.Framework - 这些很可能是罪魁祸首。

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. 希望这有助于某人 - 我们正在拉头发,直到找到问题的根源。

Looks like Apple has reverted the changes now. 看起来Apple现在已经恢复了这些变化。 All apps are going through just as usual again :) 所有应用程序都像往常一样经历:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM