iOS14 本地网络(Local Network)被拒

转自:https://www.jianshu.com/p/f34e2a829d3c

记录一次审核被拒, 先看苹果邮件内容及截图

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.

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-HilpLoOg-1610265149120)(//upload-images.jianshu.io/upload_images/1547505-e5b50e40f9e3d4eb.png?imageMogr2/auto-orient/strip|imageView2/2/w/428)]

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

  • 找出使用本地网络的第三方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)权限弹框,避免审核被拒

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值