简体   繁体   English

如何处理AppStore警告 - 缺少目的字符串,因为第三方库?

[英]How to handle AppStore Warning - Missing Purpose String, because of third party library?

I have uploaded new build of the application that was in the App Store for severals years. 我已经上传了几年来在App Store中的应用程序的新版本。

Received following email from iTunes Connect: 收到以下来自iTunes Connect的电子邮件:

Your delivery was successful, but you may wish to correct the following issues in your next delivery: ITMS-90683: Missing Purpose String in Info.plist - 您的交付成功,但您可能希望在下次交付时更正以下问题:ITMS-90683:Info.plist中缺少用途字符串 -

NSLocationAlwaysUsageDescription NSLocationWhenInUseUsageDescription

The application is not using location for any purpose. 该应用程序不是出于任何目的使用位置。

It may be caused: 可能是由于:

  • one of the pods I updated, has added usage of Location (admob?) 我更新过的其中一个pod,添加了Location的位置(admob?)
  • apple started to perform this check very recently 苹果最近开始执行这项检查

I have looked for Location and CoreLocation stuff in the project but no results. 我在项目中查找了Location和CoreLocation但没有结果。 It might be compiled binary using it. 它可能是使用它编译的二进制文件。 But how to know which and for what purpose? 但是如何知道哪个目的和目的是什么?

What is the developer supposed to write in the purpose string if it's some 3rd party lib using that permission? 如果使用该权限的某些第三方lib,开发人员应该在目的字符串中写什么?

PD: From what I know for AdMob, at least on Android, it's been using location since long time ago. PD:据我所知,对于AdMob,至少在Android上,它很久以前一直在使用位置。 https://developers.google.com/admob/ios/targeting#location https://support.google.com/admob/answer/6373176?hl=en https://developers.google.com/admob/ios/targeting#location https://support.google.com/admob/answer/6373176?hl=zh-CN

PD2: Just found this PD2:刚发现这个

7.8.1 2016‑05‑11 Added SDK support for automatically using location data when a user has explicitly enabled an app's location permissions. 7.8.1 2016-05-11 添加了SDK支持,以便在用户明确启用应用程序的位置权限时自动使用位置数据。

In release notes: https://developers.google.com/admob/ios/rel-notes 在发行说明中: https//developers.google.com/admob/ios/rel-notes

PD3: Just found the issue on Google Groups forum of AdMob: https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/ios/byShbNTrumk PD3:刚刚在AdMob的Google网上论坛上发现了这个问题: https//groups.google.com/forum/# ! category- topic/ google-admob-ads-sdk/ios/byShbNTrumk

But how to know which and for what purpose? 但是如何知道哪个目的和目的是什么?

You can use nm to look at the symbols of the libraries/frameworks you're linking against. 您可以使用nm来查看要链接的库/框架的符号。 Try 尝试

nm <frameworkname> | grep CoreLocation

To find all binary archives in your Pods folder, run 要查找Pods文件夹中的所有二进制存档,请运行

find . -type file | xargs file | grep "Mach-O.*ar archive" | 
  awk '{print $1}' | tr -d : | xargs nm | grep CoreLocation

Once you find the offending lib, you can try to figure out what purpose location data has and then decide whether you can get rid of it, or continue using it and add the required permission strings, as @Rob explains. 一旦找到有问题的lib,就可以尝试找出位置数据的用途,然后决定是否可以删除它,或者继续使用它并添加所需的权限字符串,如@Rob解释的那样。

What is the developer supposed to write in the purpose string if it's some 3rd party lib using that permission?” 如果使用该权限的某些第三方lib,开发人员应该在目的字符串中写什么?“

I'd suggest something that captures precisely what that third party library is doing with the location data, eg “Used to present offers and ads unique to your current location” or “So our corporate overlords can track your every movement” (just kidding ... sort of). 我建议使用位置数据准确捕捉第三方图书馆正在做什么,例如“用于呈现您当前位置独有的优惠和广告”或“因此我们的公司领主可以跟踪您的每一个动作”(只是开玩笑。 .. 有点)。

If you never actually request location services, this likely will never be presented to the user (presumably AdMob doesn't actually request location services, but just avails itself of them when available), so, from an end-user's perspective, it might not matter too much what text you use here. 如果您从未真正请求位置服务,这可能永远不会呈现给用户(可能AdMob实际上并不会请求位置服务,但只在可用时才使用它们),因此,从最终用户的角度来看,它可能不会你在这里用什么文字太重要了。

But I'd still encourage some string here that captures all the ways that the location data will be used. 但我仍然鼓励在这里捕获一些字符串,捕获位置数据的所有使用方式。 If you later add your own location services features (triggering this disclosure to be presented), this will remind you (or some future developer) to disclose not only the app's intended use of location data, but also disclose all ways the location data may be used. 如果您以后添加自己的位置服务功能(触发此呈现),这将提醒您(或某些未来的开发人员)不仅要披露应用程序对位置数据的预期用途,还要披露位置数据的所有方式。用过的。 We want our customers to be able to make informed privacy decisions. 我们希望客户能够做出明智的隐私决策。 And by filling in these usage strings now, it minimizes the chance that we forget later about how AdMob (or whatever) is using the data. 现在填写这些用法字符串,可以最大限度地减少我们稍后忘记AdMob(或其他)如何使用数据的机会。

Another place with related issue: https://github.com/OneSignal/OneSignal-iOS-SDK/issues/368 另一个有相关问题的地方: https//github.com/OneSignal/OneSignal-iOS-SDK/issues/368

Tried removing OneSignal pod and uploading a new build. 尝试删除OneSignal pod并上传新版本。 This time all worked without any email from apple. 这一次都没有苹果的任何电子邮件。

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

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