ios SDK中含有两种权限未加描述被apple拒绝~

NSLocationAlwaysUsageDescription
NSLocationWhenInUseUsageDescription

这个两个如果用户未使用到, 打包构建版本会收到警告⚠️, 并要求去掉或补充描述;

邮件如下:

                                
    Dear Developer,

  We identified one or more issues with a recent delivery
  for your app, "xxxx".

    Your delivery was successful, but you may wish to correct the following issues in your next delivery:
    


	Missing Purpose String in Info.plist -  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. Learn more 
(https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).

	Missing Purpose String in Info.plist -  Your app's code 
references one or more APIs that access sensitive user data. The app's 
Info.plist file should contain a NSLocationWhenInUseUsageDescription 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. Learn more 
(https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).

      
      After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to App Store Connect.

Best regards,
The App Store Team

请升级到最新版,目前最新版是 11.6.3 。

再次确认一下, 是不是之前的 sdk 一直有这两个 key 两种权限都存在? 得确保这次提交两个 key 都不存在这个问题才可以~ 谢谢~

旧 SDK 引入了 CoreLocation 这个系统库,所以 App 在使用旧 SDK 时,需要设置和 Location 相关的权限。

新 SDK 移除了对 CoreLocation 的引用。