Reputation: 101
I want to use CameraRoll to get a picture but broken by red-screen.
So I tried following:
//print: undefined
console.log(RCTCameraRollManager);
Upvotes: 8
Views: 6112
Reputation: 16317
Being an android developer, I was struggling to use the react-native camera roll. I was able to find it in following location :-
node_module/react-native/Libraries/CameraRoll
And while linking the library using "react-native link cameraRoll , I was facing the following error:-
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/react-native-cameraroll
So we need to manually link it as follows:
open your Xcode.Then from the node_module/react-native/Libraries/CameraRoll, drag the RCTCameraRoll.xcodeproj into the left side pane of Libraries folder. Now go to Project - general --"Linked frameworks and libraries" add (+) the folder named libRCTCameraRoll.a.
Re-install and it works.
Upvotes: 3
Reputation: 1976
Please check if RCTCameraRoll is added to your library. If not you must link the library to from node_module/react-native/Libraries/CameraRoll
There is great guide to linking libraries to react-native in the react-native docs https://facebook.github.io/react-native/docs/linking-libraries-ios.html#content
Upvotes: 15