xcode 广告标识符 [IDFA] 使用不当(限制广告跟踪)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23004591/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Improper advertising identifier [IDFA] usage (Limit Ad Tracking)
提问by MMM
I'm submitting an ios game update to the app store.
我正在向应用商店提交 ios 游戏更新。
xcode shows the following error: "Improper advertising identifier [IDFA] usage. Your app contains the Advertising Identifier [IDFA] API but your app is not respecting the Limit Ad Tracking setting in iOS."
xcode 显示以下错误:“广告标识符 [IDFA] 使用不当。您的应用程序包含广告标识符 [IDFA] API,但您的应用程序未遵守 iOS 中的限制广告跟踪设置。”
I haven't changed anything regearding my ad settings and there were no problems with the last version of my app.
我没有更改任何关于我的广告设置的内容,并且我的应用程序的最新版本没有任何问题。
I have been trying to find a workaround for the last 20 hours and I am starting to become insane. What do I have to change and how? Please help me!
在过去的 20 个小时里,我一直在努力寻找解决方法,但我开始变得疯狂。我需要改变什么以及如何改变?请帮我!
采纳答案by Marko
I had the same problem and was able to solve it by removing AdMob ads and leaving only iAds. I know that this isn't a perfect solution but afterwards you should at least be able to upload your app.
我遇到了同样的问题,并且能够通过删除 AdMob 广告并仅保留 iAd 来解决它。我知道这不是一个完美的解决方案,但之后您至少应该能够上传您的应用程序。
回答by JanB
I had a similar error in an update to an app. I wasn't using any ads but do have Facebook integration (which needs the AdSupport framework). I believe, after searching the net, that Facebook uses the advertising ID for its own analysis purposes so, even though I'm not including ads in my app, the validation and upload processes through xCode were failing with the error "Your app contains the Advertising Identifier [IDFA] API..."
我在更新应用程序时遇到了类似的错误。我没有使用任何广告,但确实有 Facebook 集成(需要 AdSupport 框架)。我相信,在网上搜索之后,Facebook 将广告 ID 用于自己的分析目的,因此,即使我没有在我的应用程序中包含广告,通过 xCode 的验证和上传过程也失败并显示错误“您的应用程序包含广告标识符 [IDFA] API...”
I searched and found that I needed to download the Facebook SDK source code, update the FBUtility.m to remove the references to the advertisingID but, in fact, I simply needed to:
我搜索并发现我需要下载 Facebook SDK 源代码,更新 FBUtility.m 以删除对 adsID 的引用,但实际上,我只需要:
1) download the source code for the latest SDK, which I did from here: https://github.com/facebook/facebook-ios-sdk(I downloaded the zip file from github to my documents folder)
1)下载最新SDK的源代码,我从这里做的:https: //github.com/facebook/facebook-ios-sdk(我从github下载了zip文件到我的文档文件夹)
2) build the framework - open the terminal. Use cd documents at the command prompt, then use this command: sudo scripts/build_framework.sh, which will run the build_framework.sh script that is in the scripts subfolder within the downloaded Facebook SDK folder
2)搭建框架——打开终端。在命令提示符下使用 cd 文档,然后使用以下命令:sudo scripts/build_framework.sh,它将运行 build_framework.sh 脚本,该脚本位于下载的 Facebook SDK 文件夹中的脚本子文件夹中
3) Remove the old FacebookSDK.framework from your Xcode project and add the new one (in my case, I navigated to documents/facebook-ios-sdk/build & choose the FacebookSDK.framework folder
3) 从你的 Xcode 项目中删除旧的 FacebookSDK.framework 并添加新的(在我的例子中,我导航到文档/facebook-ios-sdk/build 并选择 FacebookSDK.framework 文件夹
4) Archive the project and it should (it was in my case) be good to upload
4)存档项目,它应该(在我的情况下)可以上传
Hope that helps someone along the way - I've been at this for days!!
希望一路上对某人有所帮助-我已经在这里待了好几天了!!
回答by user3529286
You can try update newest version of Admob, or check [ASIdentifierManager sharedManager] isAdvertisingTrackingEnabled before call Admob because Apple now require apps need check this settings in user devices.
您可以尝试更新 Admob 的最新版本,或者在调用 Admob 之前检查 [ASIdentifierManager sharedManager] isAdvertisingTrackingEnabled 因为 Apple 现在要求应用程序需要在用户设备中检查此设置。
回答by codyko
I ran into the same problem. TapJoy was the culprit for me. I removed their SDK and the app submitted without an issue.
我遇到了同样的问题。TapJoy 是我的罪魁祸首。我删除了他们的 SDK,提交的应用程序没有问题。
回答by djogon
Apple changed their IDFA scanning procedures recently. 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.
Apple 最近更改了他们的 IDFA 扫描程序。单击“准备上传”后,您不仅必须选中相应的复选框,而且您的代码(或您拥有的任何其他第三方库必须通过直接使用类来使用 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. I can't say I disagree with that decision.
不要使用这种方法加载这个类!新的扫描程序将专门为此查找,如果找到它而不是直接引用 - Apple 似乎认为跟踪标识符有一些奇怪的用法。我不能说我不同意这个决定。
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. 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 并查看哪些库无法链接。这些库不是问题所在。看看您是否有其他不需要包含 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.
希望这对某人有所帮助 - 我们一直在努力,直到找到问题的根源。
回答by rishabh
Everything has come to its usual state now. Simply upload your binary as you've been doing this while, and broadly classify IDFA in two categories:
现在一切都恢复了往常的状态。只需上传您的二进制文件,并将 IDFA 大致分为两类:
publisher: You use third-party ad-networks library to display ad. Choose the 1st option in IDFA -> "Serve advertisements within the app". You're a publisher since you show ads, but do not perform advertising for your own app.
发布者:您使用第三方广告网络库来展示广告。选择 IDFA 中的第一个选项 ->“在应用内投放广告”。您是发布商,因为您展示了广告,但不为您自己的应用投放广告。
Advertiser: You use third-party libraries to track conversions for your app, as well as track 'goals' in your app. You directly do not show ads in your app. Choose the 2nd & 3rd option in IDFA -> "Attribute this app installation to a previously served ad". AND "Attribute an action taken within this app to a previously served advertisement".
广告商:您使用第三方库来跟踪应用的转化情况,以及跟踪应用中的“目标”。您不会直接在您的应用中展示广告。选择 IDFA 中的第二个和第三个选项 ->“将此应用安装归因于先前提供的广告”。并且“将在此应用程序中执行的操作归因于先前提供的广告”。
Mixed: You track conversions for your app, as well as display ads in your app. Choose all three options.
混合:您跟踪应用的转化情况,以及在应用中展示广告。选择所有三个选项。