简体   繁体   English

在IOS中无法打开Expo移动摄像头许可窗口

[英]Expo mobile camera permission windows don't open in IOS

How are you, I am building Expo project and I need to ask camera permission. 您好,我正在建设世博会项目,我需要征得相机许可。 But it don't open windows for permission 但是它不会打开允许窗口

const { status1 } = await Permissions.getAsync(Permissions.CAMERA);
        if (status1 !== 'granted') {
            alert('please give CAMERA permission!')
        }
        const { status2 } = await Permissions.getAsync(Permissions.CAMERA_ROLL);
        if (status2 !== 'granted') {
            alert('please give CAMERA_ROLL permission!')
        }

I see alert because there are no permissions, but it don't show windows to give permissin, there is no way. 我看到警报是因为没有权限,但是没有显示允许permissin的窗口,所以没有办法。

Where else can I give those permission for Expo project? 我还能在哪些地方给予世博项目许可? Thanks 谢谢

Change Permissions.getAsync to Permissions.askAsync . 更改Permissions.getAsyncPermissions.askAsync See here for more info. 有关更多信息,请参见此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM