iOS14 本地网络(Local Network)权限弹框审核被拒及解决方案

苹果邮件内容

Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage


We noticed that your app requests the user’s consent to access the local network information, but doesn’t sufficiently explain the use of the local network information in the purpose string.

To help users make informed decisions about how their data is used, all permission request alerts need to specify how your app will use the requested information.

Next Steps

Please revise the relevant purpose string in your app’s Info.plist file to specify why your app needs access to the user's local network information. Make sure the purpose string includes an example of how the user's data will be used.

You can modify your app's Info.plist file using the property list editor in Xcode.

Resources

- See examples of helpful, informative purpose strings.
- Review a list of relevant property list keys.

Please see attached screenshot for details.

苹果认为我用到了本地网络权限却没有详细说明,但是项目中并没有用到这个权限
于是找到以下解决办法

1.在info.plist 文件中添加 NSLocalNetworkUsageDescription 【app名称】需要访问您的本地网络才能与【app名称】服务器连接

2.CD到项目根目录下,在终端执行命令

grep -r SimplePing .

找出使用本地网络的第三方SDK
我发现高德的库用到了本地网络,所以在命令行执行

pod update
pod install

,将第三方库更新到最新版本,再次执行上述命令行,高德地图SDK消失,说明高德地图在最新版本中做了适配,再次打包提交审核,完美通过

你可能感兴趣的:(iOS14 本地网络(Local Network)权限弹框审核被拒及解决方案)