iOS info.plist 配置文件
在iOS開發(fā)中 .plist文件其實(shí)是XML格式的文本文件鱼的。
這次遇到一個(gè)問題仪或,老項(xiàng)目更新準(zhǔn)備上架蒂教,在上架的時(shí)候被拒了,報(bào)
ITMS-90683: Missing purpose string in Info.plist - Your app’s code references one or more APIs that access sensitive user data, or the app has one or more entitlements that permit such access. The Info.plist file for the “XXX” bundle should contain a NSBluetoothPeripheralUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. 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.
在老項(xiàng)目中因?yàn)榭赡芨倪^名字的原因畴嘶,.plist文件不會(huì)自動(dòng)索引關(guān)鍵字蛋逾,導(dǎo)致申請(qǐng)的藍(lán)牙權(quán)限是手動(dòng)輸入的,Privacy - Bluetooth Peripheral Usage Description和Privacy - Bluetooth Always Usage Description不會(huì)替換成NSBluetoothPeripheralUsageDescription 和NSBluetoothAlwaysUsageDescription 于是上架的時(shí)候報(bào)沒有申請(qǐng)權(quán)限窗悯。
解決辦法 在其他項(xiàng)目中復(fù)制原始值過來(lái):在對(duì)應(yīng)的plist權(quán)限目錄點(diǎn)擊 raw keys and values 復(fù)制区匣,粘貼。