上傳App Store隱私權(quán)限問題導(dǎo)致初審被拒

近期公司項(xiàng)目安全整改,應(yīng)用內(nèi)獲取系統(tǒng)權(quán)限都要報(bào)備并說明用途,所以就在info.plist文件中刪除了部分沒用的權(quán)限,下次就不用報(bào)備了。今天新版本發(fā)布打包成功,上傳成功,但是沒審核通過。

問題如下

Dear Developer,
We identified one or more issues with a recent delivery for your app, "xxx". Please correct the following issues, then upload again.
Missing Purpose String in Info.plist File - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSContactsUsageDescription 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).

大致意思是應(yīng)用或SDK用到通訊錄API,但是缺少NSContactsUsageDescription權(quán)限和描述信息。

如何定位哪里用到了通訊錄API及解決審核禮包問題呢?

在代碼中刪除通訊錄依賴庫Contancts.frameworkAddressBook.framework,然后運(yùn)行

1、包含有通訊錄API運(yùn)行后會(huì)報(bào)錯(cuò),就可以定位到具體方法及用途。

image.png

在info.plist中添加如下:

<key>NSContactsUsageDescription</key> 
<string>需要您的同意,才能訪問通訊錄</string>

2、如果刪除依賴庫運(yùn)行沒有報(bào)錯(cuò),重新打包上傳即可

總結(jié)

刪除隱私權(quán)限之前最好提前檢查代碼中或第三方SDK是否使用到相關(guān)API,否則發(fā)布升級(jí)浪費(fèi)幾次打包時(shí)間。

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

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

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