others - App Store Appstore connect 错误 :Missing Purpose String in Info.plist File

我已经提交应用到 Appstore connect ,虽然应用在审查,但收到了一封电子邮件,通知我必须修复一个错误,以下是消息的内容:


 Dear Developer,



 We identified one or more issues with a recent delivery for your 


 app XXXXX. Your delivery was successful, but you 


 may wish to correct the following issues in your next delivery:



"Missing Purpose String in Info.plist File. Your app's code 


 references one or more APIs that access sensitive user data. The 


 app's Info.plist file should contain a 


 NSLocationAlwaysUsageDescription key with a user-facing purpose 


 string explaining clearly and completely why your app needs the 


 data. Starting spring 2019, all apps submitted to the App Store 


 that access user data will be required to include a purpose 


 string.If you're using external libraries or SDKs, they may 


 reference APIs that require a purpose string. While your app might 


 not use these APIs, a purpose string is still required. You can 


 contact the developer of the library or SDK and request they 


 release a version of their code that doesn't contain the APIs. 



 After you’ve corrected the issues, you can use Xcode or 


 Application Loader to upload a new binary to iTunes Connect.



 Best regards,



 The App Store Team



时间:

解决方案很简单,在.plist文件中添加以下行。

<key>NSLocationAlwaysUsageDescription</key>

<string>custom message</string>

<key>NSLocationWhenInUseUsageDescription</key>

<string>custom message</string>

我们收到了同样的邮件,而且我们根本没有使用 CoreLocation 。 在快速搜索之后,我们发现解析SDK可以使用 CoreLocation 。 在苹果的电子邮件中,他们清楚地说:

If you're using external libraries or SDKs, they may reference APIs that require a purpose string.

这意味着代码或者任何其他库或者sdk可以使用 CoreLocation,即使你不使用,也需要为 When In UseAlway Use 提供隐私描述。

它也是苹果的新东西,现在只是一个警告,但是它将在 spring 2019中开始新提交。

由于你的应用程序没有包含"NSLocationAlwaysUsageDescription",因此出现这里问题。 当我试图在 AppStore 上提交我的应用程序时,我遇到了同样的问题。 应用被处理后,我得到了同样的邮件。 我只是添加了描述和它的解析。

希望这有帮助

...