CameraRoll is a react-native native module that provides access to the local camera roll or photo library.
Go to file
Bartol Karuza c8e2a7bd77 cleanup iOS example project 2019-02-24 13:13:43 +08:00
android capitalize CameraRollPackage 2019-02-24 12:31:38 +08:00
example cleanup iOS example project 2019-02-24 13:13:43 +08:00
ios in file renames 2019-02-24 12:29:24 +08:00
js setup of library config files for flow, eslint, babel, jest, etc.. 2019-02-24 12:57:12 +08:00
.eslintignore setup of library config files for flow, eslint, babel, jest, etc.. 2019-02-24 12:57:12 +08:00
.eslintrc.js setup of library config files for flow, eslint, babel, jest, etc.. 2019-02-24 12:57:12 +08:00
.flowconfig renaming react-native-cameraroll > @react-native-community/camerroll 2019-02-24 12:59:58 +08:00
.gitattributes setup of library config files for flow, eslint, babel, jest, etc.. 2019-02-24 12:57:12 +08:00
.gitignore setup of library config files for flow, eslint, babel, jest, etc.. 2019-02-24 12:57:12 +08:00
.npmignore setup of library config files for flow, eslint, babel, jest, etc.. 2019-02-24 12:57:12 +08:00
.prettierrc setup of library config files for flow, eslint, babel, jest, etc.. 2019-02-24 12:57:12 +08:00
README.md renaming react-native-cameraroll > @react-native-community/camerroll 2019-02-24 12:59:58 +08:00
babel.config.js setup of library config files for flow, eslint, babel, jest, etc.. 2019-02-24 12:57:12 +08:00
jest.setup.js setup of library config files for flow, eslint, babel, jest, etc.. 2019-02-24 12:57:12 +08:00
package.json setup of library config files for flow, eslint, babel, jest, etc.. 2019-02-24 12:57:12 +08:00
yarn.lock setup of library config files for flow, eslint, babel, jest, etc.. 2019-02-24 12:57:12 +08:00

README.md

react-native-cameraroll

Getting started

$ npm install @react-native-community/cameraroll --save

Mostly automatic installation

$ react-native link @react-native-community/cameraroll

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modules@react-native-community/cameraroll and add RNCCameraroll.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNCCameraroll.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactnativecommunity.cameraroll.RNCCamerarollPackage; to the imports at the top of the file
  • Add new RNCCamerarollPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':@react-native-community/cameraroll'
    project(':@react-native-community/cameraroll').projectDir = new File(rootProject.projectDir, 	'../node_modules/@react-native-community/cameraroll/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':@react-native-community/cameraroll')
    

Usage

import RNCCameraroll from '@react-native-community/cameraroll';

// TODO: What to do with the module?
RNCCameraroll;