ios 我的应用程序因使用广告支持框架而被拒绝。哪个图书馆负责?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21489097/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 23:19:53  来源:igfitidea点击:

My app was just rejected for using the Ad support framework. Which library is responsible?

iosparse-platformappstore-approvalflurrytestflight

提问by user2844801

This was simply an update that didn't change anything to do with the rejection reason. Here is the response from the resolution center:

这只是一个更新,与拒绝原因没有任何改变。以下是解决中心的回复:

Reasons Program License Agreement PLA 3.3.12

We found your app uses the iOS Advertising Identifier but does not include ad functionality. This does not comply with the terms of the iOS Developer Program License Agreement, as required by the App Store Review Guidelines.

Specifically, section 3.3.12 of the iOS Developer Program License Agreement states:

"You and Your Applications (and any third party with whom you have contracted to serve advertising) may use the Advertising Identifier, and any information obtained through the use of the Advertising Identifier, only for the purpose of serving advertising. If a user resets the Advertising Identifier, then You agree not to combine, correlate, link or otherwise associate, either directly or indirectly, the prior Advertising Identifier and any derived information with the reset Advertising Identifier."

Please check your code - including any third-party libraries - to remove any instances of:

class: ASIdentifierManager
selector: advertisingIdentifier
framework: AdSupport.framework

If you are planning to incorporate ads in a future version, please remove the Advertising Identifier from your app until you have included ad functionality.

To help locate the Advertising Identifier, use the “nm” tool. For information on the “nm” tool, open a terminal window and enter, “man nm.”

If you do not have access to the libraries source, you may be able to search the compiled binary using the "strings" or "otool" command line tools. The "strings" tool lists the methods that the library calls, and "otool -ov" will list the Objective-C class structures and their defined methods. These techniques can help you narrow down where the problematic code resides.

原因 程序许可协议 PLA 3.3.12

我们发现您的应用使用了 iOS 广告标识符,但不包含广告功能。这不符合 App Store 指南要求的 iOS 开发者计划许可协议的条款。

具体来说,iOS 开发者计划许可协议的第 3.3.12 节规定:

“您和您的应用程序(以及与您签订了提供广告服务的合同的任何第三方)可以使用广告标识符以及通过使用广告标识符获得的任何信息,仅用于提供广告服务。如果用户重置广告标识符,则您同意不将先前的广告标识符和任何派生信息与重置的广告标识符直接或间接组合、关联、链接或以其他方式关联。”

请检查您的代码 - 包括任何第三方库 - 以删除以下任何实例:

类:ASIdentifierManager
选择器:advertisingIdentifier
框架:AdSupport.framework

如果您计划在未来版本中加入广告,请从您的应用中删除广告标识符,直到您加入广告功能。

要帮助定位广告标识符,请使用“nm”工具。有关“nm”工具的信息,请打开终端窗口并输入“man nm”。

如果您无权访问库源代码,则可以使用“strings”或“otool”命令行工具搜索已编译的二进制文件。“strings”工具列出了库调用的方法,“otool -ov”将列出Objective-C类结构及其定义的方法。这些技术可以帮助您缩小有问题的代码所在的位置。

The third party libraries I'm using is the latest version of parse.com sdk, latest version of flurry analytics, and version 2.2 of test flight. Does anybody know which library is the issue? Thanks

我使用的第三方库是最新版本的parse.com sdk, latest version of flurry analytics, and version 2.2 of test flight. 有人知道哪个图书馆有问题吗?谢谢

回答by Adam

In Terminal:

在终端:

  1. Go to the root folder of your project
  2. Type: grep -r advertisingIdentifier .(the dot at the end is critical)
  1. 转到项目的根文件夹
  2. 类型:(grep -r advertisingIdentifier .末尾的点很关键)

This will recursively check every file, and give you the name of the offending library.

这将递归检查每个文件,并为您提供违规库的名称。

(in my case, it was Flurry)

(就我而言,它是 Flurry)

回答by Glauco Neves

Update

更新

Google released Google Analytics Services iOS SDK v3.03c which removes the AdSupport.framework dependency by default.

Google 发布了 Google Analytics Services iOS SDK v3.03c,它默认删除了 AdSupport.framework 依赖项。

Full changelog entry for Release Version 3.03c (February 19, 2014): https://developers.google.com/analytics/devguides/collection/ios/changelog

发布版本 3.03c(2014 年 2 月 19 日)的完整变更日志条目:https: //developers.google.com/analytics/devguides/collection/ios/changelog

Old Awnser

老铁匠

My problem was with Google Analytics and TestFlight.

我的问题是 Google Analytics 和 TestFlight。

For TestFlight I just update the library to the version 2.2.1 (https://www.testflightapp.com/sdk/ios/release_notes/2.2.1/).

对于 TestFlight,我只是将库更新到 2.2.1 版(https://www.testflightapp.com/sdk/ios/release_notes/2.2.1/)。

But for updating Google Analytics I had to remove the -ObjC flag. But as I use Cocoapods to manage some of third libraries, I couldn't just remove it. So I did the follow:

但是为了更新 Google Analytics,我必须删除 -ObjC 标志。但是当我使用 Cocoapods 来管理一些第三方库时,我不能直接删除它。所以我做了以下事情:

1 - started updating the libGoogleAnalytics.a to Version 3.03a (February 5, 2014)

1 - 开始将 libGoogleAnalytics.a 更新到版本 3.03a(2014 年 2 月 5 日)

2 - then a removed also the AdSupport.framework

2 - 然后也删除了 AdSupport.framework

3 - added "-force_load\ "${PROJECT_DIR}/Source/Library/GoogleAnalyticsServicesiOS_3.03a"" under "Target --> Build Settings --> Other Linker Flags" (Note that in my project the GoogleAnalytics is inside /Source/Library/ folder, and you have to configure your own)

3 - 在“目标 --> 构建设置 --> 其他链接器标志”下添加了“-force_load\”${PROJECT_DIR}/Source/Library/GoogleAnalyticsServicesiOS_3.03a””(请注意,在我的项目中,GoogleAnalytics 位于 /Source/ Library/文件夹,你必须自己配置)

But as I coudn't remove -ObjC flag I searched for how to use -force_load flag with Cocoapods, then I found two useful links:

但是由于我无法删除 -ObjC 标志,所以我搜索了如何在 Cocoapods 中使用 -force_load 标志,然后我找到了两个有用的链接:

1 - https://github.com/CocoaPods/CocoaPods/issues/712

1 - https://github.com/CocoaPods/CocoaPods/issues/712

2 - http://www.deanmao.com/2012/12/31/linker-error-using-cocoapods/

2 - http://www.deanmao.com/2012/12/31/linker-error-using-cocoapods/

To summarize I changed the -ObjC flag for "-force_load $(TARGET_BUILD_DIR)/libPods.a" also under "Target --> Build Settings --> Other Linker Flags"

总而言之,我还在“目标 --> 构建设置 --> 其他链接器标志”下为“-force_load $(TARGET_BUILD_DIR)/libPods.a”更改了 -ObjC 标志

But again, when I tried to publish my app I got an error telling me that the compiler didn't find libPods.a, so I went to "Target --> Build Settings --> Other Linker Flags --> Release" and change this string $(TARGET_BUILD_DIR) to ${BUILT_PRODUCTS_DIR}.

但同样,当我尝试发布我的应用程序时,我收到一个错误,告诉我编译器没有找到 libPods.a,所以我转到“目标 --> 构建设置 --> 其他链接器标志 --> 发布”和将此字符串 $(TARGET_BUILD_DIR) 更改为 ${BUILT_PRODUCTS_DIR}。

So my Other Linker Flags became like the image below. Other Linker Flags

所以我的其他链接器标志变成了下图。 其他链接器标志

Hope to help somebody.

希望对某人有所帮助。

Sorry for my english. =]

对不起我的英语不好。=]

回答by Fradow

For me, Flurry Analytics and TestFlight were both the problem.

对我来说,Flurry Analytics 和 TestFlight 都是问题所在。

For TestFlight, it's as easy as updating it. The 2.2.1 version won't cause any problem (I checked using strings, as Apple suggest)

对于 TestFlight,它就像更新它一样简单。2.2.1 版本不会造成任何问题(我使用字符串进行了检查,正如 Apple 建议的那样)

For Flurry, there is currently no fix apart from removing Flurry, and contrary to Lou Weed suggestion, even if AdSupport.framework is not linked, your app will be rejected.

对于 Flurry,目前除了移除 Flurry 之外没有其他解决方法,并且与 Lou Weed 的建议相反,即使 AdSupport.framework 未链接,您的应用也会被拒绝。

Here is Flurry support answer :

这是 Flurry 支持答案:

"Thank you for reaching out to Flurry. We have recently learned that Apple has rejected some apps it believes are using the Identifier for Advertising (IDFA) without including ad functionality. Please note that Flurry does not collect the IDFA unless an app includes the AdSupport.framework for ad functionality. We are seeking clarification with Apple and we will update our affected customers as we learn more over the next several days."

“感谢您联系 Flurry。我们最近了解到,Apple 拒绝了一些它认为使用广告标识符 (IDFA) 而不包含广告功能的应用程序。请注意,除非应用程序包含 AdSupport,否则 Flurry 不会收集 IDFA .framework 的广告功能。我们正在向 Apple 寻求澄清,我们将在未来几天了解更多信息后更新受影响的客户。”

Flurry just released the version 4.3.2 of their SDK, which specifically address that problem.

Flurry 刚刚发布了他们 SDK 的 4.3.2 版本,专门解决了这个问题。

回答by gmogames

Crashlytics was the problem. We had a few apps rejected because of it. But I already talked with Crashlytics and they released a new update today (version 2.1.6) which fix this issue.

Crashlytics 是问题所在。我们有一些应用程序因此被拒绝。但是我已经与 Crashlytics 进行了交谈,他们今天发布了一个新的更新(版本 2.1.6)来解决这个问题。

Several libraries have the AdSupport.framework but they do not use it unless specifically called. Crashlytics was calling the framework because it had to check if the app had support for ads. And that change was implemented on version 2.1.5

一些库具有 AdSupport.framework,但除非特别调用,否则它们不会使用它。Crashlytics 调用该框架是因为它必须检查该应用程序是否支持广告。并且该更改已在 2.1.5 版上实施

So if you are using crashlytics, that's the most probable reason. To fix that, just re-archive your app so crashlytics can use the new version with this fix.

因此,如果您使用的是 crashlytics,那是最可能的原因。要解决这个问题,只需重新归档您的应用程序,以便 crashlytics 可以使用带有此修复程序的新版本。

Response from Crashlytics Team: "We just pushed out an update for this- can you build and run your app again with the Mac app open so it can update your SDK? You'll be all good to go after that! Keep me posted after you resubmit :)"

Crashlytics 团队的回应:“我们刚刚为此推出了一个更新 - 您能否在打开 Mac 应用程序的情况下再次构建和运行您的应用程序,以便它可以更新您的 SDK?之后您会很高兴的!请在之后通知我你重新提交:)”

PS: This is starting to happen because Apple seem to have changed their policy for ADSupport usage.

PS:这开始发生了,因为 Apple 似乎已经改变了他们的 ADSupport 使用政策。

回答by user2844801

Turns out the Testflight v2.2.0 was the conflict. They have since fixed it according to their changelog: Consolidate both SDK versions into one which removes all access to ASIdentifierManager

原来 Testflight v2.2.0 是冲突的。他们已经根据他们的更新日志修复了它:Consolidate both SDK versions into one which removes all access to ASIdentifierManager

回答by Louis St-Amour

I'd previously written the following in comments, directing people to the "strings" or "otool" terminal commands. However, I really like the suggested answer of using grep. So you can try it first. My suggestion is to prepend "git" to that command, because it's so much faster:

我以前在评论中写过以下内容,将人们引导到“字符串”或“otool”终端命令。但是,我真的很喜欢使用 grep 的建议答案。所以你可以先试试。我的建议是在该命令前加上“git”,因为它要快得多:

git grep advertisingIdentifier

If that doesn't work, then try (as posted earlier):

如果这不起作用,请尝试(如之前发布的):

grep -r advertisingIdentifier . 

What follows is what I'd previously written in a comment above, as a how-to for terminal commands:

接下来是我之前在上面的评论中写的内容,作为终端命令的操作方法:

You can search your project's files in Xcode or you can try removing the AdSupport framework to see what fails at build/run time.

您可以在 Xcode 中搜索您的项目文件,或者您可以尝试删除 AdSupport 框架以查看在构建/运行时失败的内容。

To use the terminal, click Spotlight (search) and type Terminal. Wait for it to appear as an Application in the search results.

要使用终端,请单击 Spotlight(搜索)并键入终端。等待它在搜索结果中显示为应用程序。

Once in Terminal, type "cd" followed by a space, then drag and drop your Xcode build folder from Finder into Terminal. This should automatically type that folder name in. Hit Enter, and it will change directories (cd) you to that folder.

进入终端后,键入“cd”后跟一个空格,然后将您的 Xcode 构建文件夹从 Finder 拖放到终端中。这应该会自动输入该文件夹名称。按 Enter,它会将目录 (cd) 更改为该文件夹。

From there, type stringsthen a space, then the filename for your library or otool, a space and the filename for library. You should be able to hit TAB to auto-complete filenames.

从那里,键入strings一个空格,然后是您的库的文件名,或者otool,一个空格和库的文件名。您应该能够点击 TAB 来自动完成文件名。

回答by bolonn

My app was also rejected with the same error! I found an occurrence of advertisingIdentifier in the latest Facebook SDK (3.12). Maybe you can check your library's for an occurence with the method below:

我的应用程序也因同样的错误而被拒绝!我在最新的 Facebook SDK (3.12) 中发现了 adsIdentifier。也许您可以使用以下方法检查您的库是否发生:

I opened the FacebookSDK.framework as a library in the terminal and typed the following command

我在终端中将 FacebookSDK.framework 作为库打开并输入以下命令

otool -v -s __TEXT __objc_methname FacebookSDK | grep advertisingIdentifier

otool -v -s __TEXT __objc_methname FacebookSDK | grep 广告标识符

But I don't know what to do. Was my app rejected because of this reference? If yes what to do if I want to use facebook functionalities in my app?

但我不知道该怎么办。我的应用程序是否因为此引用而被拒绝?如果是,如果我想在我的应用程序中使用 Facebook 功能该怎么办?

回答by Michael DiStefano

This is a bit more complicated than it seems on the surface. After some experimentation I found that the AdSupport Framework is linked even if only directly accessing classes that are referenced in the AdSupport Framework. Ironically, [AsIdentifierManager class], which is used in a lot of third-party libraries to check whether or not the AdSupport Framework has been linked, will actually causethe AdSupport Framework to be linked. Obfuscating the class by using NSClassFromString(@"AsIdentfierManager")will not cause the AdSupport framework to be automatically linked. Of course, most of the time this code will be in third-party libraries so you won't have much control over it, however, this is what's going on.

这比表面上看起来要复杂一些。经过一些实验,我发现 AdSupport 框架是链接的,即使只是直接访问 AdSupport 框架中引用的类。讽刺的是,[AsIdentifierManager class]在很多第三方库中用来检查 AdSupport Framework 是否已链接的 ,实际上会导致AdSupport Framework 被链接。使用 using 混淆类NSClassFromString(@"AsIdentfierManager")不会导致 AdSupport 框架自动链接。当然,大多数情况下,此代码将位于第三方库中,因此您无法对其进行太多控制,但是,这就是正在发生的事情。

I built an example project on GitHub that illustrates this behavior using Segment.io's framework. https://github.com/distefam/AdSupportDemo

我在 GitHub 上构建了一个示例项目,它使用 Segment.io 的框架说明了这种行为。 https://github.com/distefam/AdSupportDemo

回答by Nir Golan

Flurry Analytics uses this API as well.
Terminal output:

Flurry Analytics 也使用这个 API。
终端输出:

Binary file ./Lib/Flurry/libFlurry_4.3.0.a matches

Flurry says that the selector is not called if AdSupport framework isn't linked.
So I removed the framework and tried submitting again.

Flurry 表示,如果 AdSupport 框架未链接,则不会调用选择器。
所以我删除了框架并再次尝试提交。