Permissions.CAMERA_ROLL

#1

Hello.

I’m facing a problem requesting CAMERA_ROLL permissions.

async requestPermission() {
const { status } = await Permissions.askAsync(Permissions.CAMERA);
const { status_roll } = await Permissions.askAsync(Permissions.CAMERA_ROLL);

console.log('camera: '+status);
console.log('roll: '+status_roll);
this.setState({ hasCameraPermission: status === 'granted' });
this.setState({ hasRollPermission: status_roll === 'granted' });

}
My logs shows:
[exp] camera: granted
[exp] roll: undefined

I checked on Docs and there it is:

Expo.Permissions.CAMERA_ROLL
The permission type for reading or writing to the camera roll.

On github issues someone asked about it and It’s solved saying:

Yes, this shipped with iOS 2.1.3 and higher: 36ea682#diff-9e304d4e8df1b74cfa009913198428ab

Sorry I didn’t reply here earlier.


https://docs.expo.io/versions/latest/sdk/permissions.html

What am I doing wrong?

Already did yarn upgrade and so…

package.json:
“expo”: “^25.0.0”,
“native-base”: “2.1.4”,
“prop-types”: “^15.6.0”,
“react”: “16.2.0”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-25.0.0.tar.gz”,

#2

I assume you set your app.json "sdkVersion": "25.0.0", ??

#3

Yes.

“expo”: “^25.0.0”,

closed #4

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.