iOS14 本地網(wǎng)絡(Local Network)權(quán)限彈框

轉(zhuǎn)自:http://www.itdecent.cn/p/f34e2a829d3c

記錄一次審核被拒, 先看蘋果郵件內(nèi)容及截圖

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.

image

谷歌翻譯下大概是蘋果認為我用到了本地網(wǎng)絡權(quán)限卻沒有詳細說明,但是項目中并沒有用到這個權(quán)限。開始逐一排查第三方庫...

  • 找出使用本地網(wǎng)絡的第三方SDK
在終端執(zhí)行命令 (要先CD到項目根目錄下)
grep -r SimplePing .

因為項目中用到激光魔鏈SDK導致的,新版本SDK移除了相關(guān)代碼,已經(jīng)不需要相應權(quán)限,pod update 更新SDK就可以了。

iOS14 當 App 要使用 Bonjour 服務時或者訪問本地局域網(wǎng),使用 mDNS 服務等,都需要授權(quán),如果應用中需要使用 LocalNetwork, 開發(fā)者需要在 Info.plist 中配置 Privacy - Local Network Usage Description詳細描述使用的為哪種服務以及用途

  • 在 Info.plist 中配置
Privacy - Local Network Usage Description : "xxApp"不會連接到您所用網(wǎng)絡上的設備,只會檢測與您本地網(wǎng)關(guān)的連通性.用戶也可以在 `設置-->隱私-->本地網(wǎng)絡`界面修改 app 的權(quán)限設置。

在適配ios14時, 取消本地網(wǎng)絡(Local Network)權(quán)限彈框,避免審核被拒

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容