React-native-image-crop-picker: Crash when calling .openCamera()

Created on 10 Mar 2017  路  3Comments  路  Source: ivpusic/react-native-image-crop-picker

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.12.6
  • react-native v0.42.0

Platform

Tell us to which platform this issue is related

  • iOS - Yes
  • Android - Unable to test

Expected behaviour

When calling ImagePicker.openCamera({width: 500, height: 500}), the camera should open.

Actual behaviour

The app simply crashes.

Steps to reproduce

calling the following method in my React native component:

openCamera () {
    ImagePicker.openCamera({width: 500, height: 500})
    .then(image => console.log(image))
  }

Most helpful comment

I will need more information, like stacktrace. Did you follow all installation instructions? It could be that you are missing NSCameraUsageDescription.

All 3 comments

I will need more information, like stacktrace. Did you follow all installation instructions? It could be that you are missing NSCameraUsageDescription.

If you want to use camera picker in your project, add following to AndroidManifest.xml
<uses-permission android:name="android.permission.CAMERA"/>

I has this and it was indeed a missing NSCameraUsageDescription

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Martian2Lee picture Martian2Lee  路  3Comments

habovh picture habovh  路  3Comments

sergiulucaci picture sergiulucaci  路  3Comments

xuchao321 picture xuchao321  路  3Comments

Phenek picture Phenek  路  3Comments