A smart barcode scanner component for React Native app.
The library uses [https://github.com/zxing/zxing][1] to decode the barcodes for android.
## Preview
![react-native-smart-barcode-preview-ios][2]
![react-native-smart-barcode-preview-android][3]
## Installation
```
npm install react-native-smart-barcode --save
```
## Installation (iOS)
* Drag RCTBarCode.xcodeproj to your project on Xcode.
* Click on your main project file (the one that represents the .xcodeproj) select Build Phases and drag libRCTBarCode.a from the Products folder inside the RCTBarCode.xcodeproj.
* Look for Header Search Paths and make sure it contains $(SRCROOT)/../../../react-native/React as recursive.
* In your project, Look for Header Search Paths and make sure it contains $(SRCROOT)/../node_modules/react-native-smart-barcode/ios/RCTBarCode/RCTBarCode
* Dray raw folder to your project
## Installation (Android)
* In `android/settings.gradle`
```
...
include ':react-native-smart-barcode'
project(':react-native-smart-barcode').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-smart-barcode/android')
```
* In `android/app/build.gradle`
```
...
dependencies {
...
// From node_modules
compile project(':react-native-smart-barcode')
}
```
* in MainApplication.java
```
...
private ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
// private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
protected boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage()
);
}
};
public void setReactNativeHost(ReactNativeHost reactNativeHost) {