Код: Выделить всё
Я нашел этот пост, в котором рассказывается, как удалить разрешения, однако мой текущий случай требует, чтобы я добавил разрешения, я все равно свяжу код из сообщения здесь. :
Код: Выделить всё
const { withAndroidManifest } = require("@expo/config-plugins")
module.exports = function androiManifestPlugin(config) {
return withAndroidManifest(config, async config => {
let androidManifest = config.modResults.manifest
// add the tools to apply permission remove
androidManifest.$ = {
...androidManifest.$,
"xmlns:tools": "http://schemas.android.com/tools",
}
// add remove property to the audio record permission
androidManifest["uses-permission"] = androidManifest["uses-permission"].map(
perm => {
if (perm.$["android:name"] === "android.permission.RECORD_AUDIO") {
perm.$["tools:node"] = "remove"
}
return perm
}
)
return config
})
}
Подробнее здесь: https://stackoverflow.com/questions/730 ... po-plugins
Мобильная версия