null is not an object (evaluating ‘_reactNativeImageCropPicker.default.openPicker’)

I was trying to integrate react-native-image-crop-picker to my react-native project. It was easy to get it working on Android but to get it to work on iOS I had to spend some considerable amount of time. Here I am writing down how I solved it hoping it will help you save your time and solve the problem faster if you should ever face it.

1 – Open your project’s .xcworkspace file in Xcode

2- Right-click “Libraries” and click “Add files to <Project_Name>”

3- Navigate to “node_modules -> react-native-image-crop-picker -> ios” and choose “imageCropPicker.xcodeproj”

4- Expand “Products” under “imageCropPicker.xcodeproj” and see “libimageCropPicker.a” file

5- Now click your <project_name>.xcworkspace root file then click “General” tab on the right

6- Scroll to the bottom and add “libimageCropPicker.a” (drag/drop) to Linked Frameworks and Libraries section

7- Clean (Command + option + shift + k) & re-build

8- If this does not work try adding RSKImageCropper.framework and QBImagePicker.framework to Embedded Binaries of your project on the “General” tab right above Linked Frameworks and Libraries section


Hope this helps.
Good Luck,