我正在使用“react-native-permissions”并请求 CONTACTS 的权限,当出现权限模式并单击“允许”时,键盘无缘无故地出现。
我正在使用这个版本:
"react-native-permissions": "^2.2.2",
"react-native": "0.63.4",
"react": "16.13.1",
我将 react-native-permissions 升级到 3.0.1,但没有任何改变。
这是我请求许可的方式:
const requestContactPermissionIos = async () => {
let granted = false;
let statuses = [];
try {
const permissionResult = await request(PERMISSIONS.IOS.CONTACTS);
statuses.push(permissionResult);
granted = permissionResult === RESULTS.GRANTED;
} catch (error) {
console.log(
'requestContactPermissionIos: unable to request for contact permission',
);
}
return {
granted,
statuses,
};
};