iOS14 本地网络(Local Network)权限弹框

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.

Specifically, it would be necessary to elaborate why this app need to connect to devices.

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.

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

屏幕快照 2020-12-15 11.47.08.png

谷歌翻译下大概是苹果认为我用到了本地网络权限却没有详细说明,但是项目中并没有用到这个权限。开始逐一排查第三方库...

找出使用本地网络的第三方SDK

在终端执行命令 (要先CD到项目根目录下)

grep -r SimplePing .

因为项目中用到激光魔链SDK导致的,新版本SDK移除了相关代码,已经不需要相应权限,pod update 更新SDK就可以了。

iOS14 当 App 要使用 Bonjour 服务时或者访问本地局域网,使用 mDNS 服务等,都需要授权,如果应用中需要使用 LocalNetwork, 开发者需要在 Info.plist 中配置 Privacy - Local Network Usage Description详细描述使用的为哪种服务以及用途

在 Info.plist 中配置

Privacy-Local Network Usage Description:"xxApp"不会连接到您所用网络上的设备,只会检测与您本地网关的连通性.用户也可以在 `设置-->隐私-->本地网络`界面修改 app 的权限设置。

在适配ios14时, 取消本地网络(Local Network)权限弹框,避免审核被拒

你可能感兴趣的:(iOS14 本地网络(Local Network)权限弹框)