低版本permissions插件兼容

This commit is contained in:
nonameShijian 2024-04-17 22:07:56 +08:00
parent 615459efb4
commit e45249f383
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ export async function cordovaReady() {
})).then(shouldRequestPermissions => {
return shouldRequestPermissions
.filter(({ hasPermission }) => !hasPermission)
.map(({ request }) => permissions[request]);
.map(({ request }) => permissions[request] || `android.permission.${request}`);
}).then(willRequestPermissions => {
permissions.requestPermissions(
willRequestPermissions,