0

Hi I want to use camera in my react-native app. For this I am following this:

https://github.com/react-native-community/react-native-camera

Its is running in Android in Windows Machine, but while am coming to iOS it is not running Mac OS.

The app is installed and loading app name and then it is crashed in iPhone.

Some times its showing an error like react-native-implementation.js: cannot read property 'bindings' of null (null)

For solving this issue, manually added this module to my project like below Manual install iOS

  1. npm install react-native-camera --save

  2. In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name]

  3. Go to node_modules ➜ react-native-camera and add RNCamera.xcodeproj

  4. Expand the RNCamera.xcodeproj ➜ Products folder In XCode, in the project navigator, select your project.

  5. Add libRNCamera.a to your project's Build Phases ➜ Link Binary With Libraries

  6. Click RNCamera.xcodeproj in the project navigator and go the Build Settings tab.

  7. Make sure 'All' is toggled on (instead of 'Basic').

  8. In the Search Paths section, look for Header Search Paths and make sure it contains both $(SRCROOT)/../../react-native/React and $(SRCROOT)/../../../React - mark both as recursive.

My System configuration:

I am using the PyCharm Editor for implementing my react-native projects.

npm: 6.1.0

react-native-cli: 2.0.1

react-native: 0.56.0

macOS HighSierra 10.13.5

Xcode 9.4.1.

WeCan
  • 547
  • 2
  • 9
  • 23

1 Answers1

0

This Bug seems related to upgrading to react-native@0.56.0.
Unfortunately there is no general solution yet. It will probably be fixed in react-native@0.56.1.
You should follow https://github.com/facebook/react-native/issues/20074 and linked issues.
Meanwhile try to use an older version of react-native like 0.55.4.

321hendrik
  • 177
  • 1
  • 8
  • thank you for this update. Now I will try degrade my react-native to 0.55.4. – WeCan Jul 12 '18 at 10:16
  • I am not downgrade my react-native, I carefully follow this https://steinar.io/building-your-own-camera-app-for-ios-with-react-native/ and its works for me – WeCan Aug 01 '18 at 13:08