Nomura Nori
Nomura Nori

Reputation: 5167

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.

Where else can I give those permission for Expo project? Thanks

Upvotes: 0

Views: 578

Answers (1)

Anjal Saneen
Anjal Saneen

Reputation: 3219

Change Permissions.getAsync to Permissions.askAsync. See here for more info.

Upvotes: 1

Related Questions