1

native-camera in my react-native app.

For this I am using https://github.com/coretech/react-native-camera

After setup this module into my project, my app was crashed and it shows a error message in console like this

[access] This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.

Even I added the keys in info.plist for accessing camera in iOS.

<key>NSPhotoLibraryAddUsageDescription</key>
<string>Your message to user when the photo library is accessed for the first time</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>uses photos</string>
<key>NSCameraUsageDescription</key>
<string>uses camera</string>

My System configuration: npm 6.1.0, react-native-cli: 2.0.1, react-native: 0.55.4, Mac OS 10.13.5, Xcode 9.3

WeCan
  • 547
  • 2
  • 9
  • 23
  • 1
    clean project.... Run again – Naresh Jul 13 '18 at 13:03
  • @ios Thank you for the reply, I already did many times,its not working. – WeCan Jul 16 '18 at 05:25
  • Refer these two links https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html. https://iosdevcenters.blogspot.com/2016/09/infoplist-privacy-settings-in-ios-10.html. And try again, all the best... – Naresh Jul 16 '18 at 05:33
  • @ios bro I already check that one and updated in my code also. It is combination of iOS and React-Native. – WeCan Jul 16 '18 at 06:35

1 Answers1

1

Finally I fix my issue by using this link https://steinar.io/building-your-own-camera-app-for-ios-with-react-native/

WeCan
  • 547
  • 2
  • 9
  • 23