今天項(xiàng)目提審的時(shí)候收到封蘋(píng)果的郵件
starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code
意思是:從2024年5月1日開(kāi)始如果應(yīng)用中用到了需要聲明的(文件時(shí)間戳,系統(tǒng)啟動(dòng)時(shí)間,磁盤(pán)空間,活動(dòng)鍵盤(pán),用戶默認(rèn))這些API,但是你沒(méi)有在隱私清單中添加原因,這樣提審會(huì)被拒
附上查看api的apple文檔鏈接:Describing use of required reason API | Apple Developer Documentation
如何配置?
目前我用的是Xcode15.2版本,打開(kāi)項(xiàng)目command + n 新建文件 在彈出框中搜索Privacy 選擇 App Pirvacy
創(chuàng)建完在項(xiàng)目列表中會(huì)有一個(gè)名為PrivacyInfo的文件
列舉的是User Defaults APIs這個(gè)API的配置
其他的API配置也可以根據(jù)這個(gè)來(lái) 只需要在Privacy Accessed API Types這個(gè)Array中添加對(duì)應(yīng)的Item即可 例如Disk space 或System boot time APIS等,在apple文檔中可以查看對(duì)應(yīng)的NSPrivacyAccessedAPITypeReasons相關(guān)值 選擇對(duì)應(yīng)的即可柱衔。