Commit 638370cf by Denglingling

新增插件【react-native-camera】,实现扫描条形码功能

parent 6a12e04a
......@@ -16,3 +16,4 @@
- 基本 `react-native-root-toast` 实现弹窗提示
- 基于 `react-native-scrollable-tab-view` 实现主页面 `Tab` 选项卡切换
- 基于 `react-native-splash-screen` 实现 `APP` 启动页布局
- 基于 `react-native-camera` 实现扫描条形码功能
......@@ -107,6 +107,7 @@ android {
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
missingDimensionStrategy 'react-native-camera', 'general'
}
splits {
abi {
......@@ -138,6 +139,7 @@ android {
}
dependencies {
implementation project(':react-native-camera')
implementation project(':react-native-splash-screen')
implementation project(':react-native-date-picker')
implementation project(':react-native-sound')
......
......@@ -3,6 +3,7 @@ package com.bonehouse_business_app;
import android.app.Application;
import com.facebook.react.ReactApplication;
import org.reactnative.camera.RNCameraPackage;
import org.devio.rn.splashscreen.SplashScreenReactPackage;
import com.henninghall.date_picker.DatePickerPackage;
import com.zmxv.RNSound.RNSoundPackage;
......@@ -30,6 +31,7 @@ public class MainApplication extends Application implements ReactApplication {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNCameraPackage(),
new SplashScreenReactPackage(),
new DatePickerPackage(),
new RNSoundPackage(),
......
......@@ -33,5 +33,7 @@ allprojects {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
}
}
rootProject.name = 'BoneHouse_Business_APP'
include ':react-native-camera'
project(':react-native-camera').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-camera/android')
include ':react-native-splash-screen'
project(':react-native-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-screen/android')
include ':react-native-date-picker'
......
......@@ -40,6 +40,7 @@
45B67B07A6F24364958008AE /* libRNImagePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D4D9542CFEE42C4BBA1A4E3 /* libRNImagePicker.a */; };
4F17B6D52CF042A5A3F04B91 /* libRNDatePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EF36AE3E9AEC4CE4BFFDCB3C /* libRNDatePicker.a */; };
5D804E4863954EA583B5D90F /* libRNSound.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C3CA8CE00B9B42E8BBF11B98 /* libRNSound.a */; };
82855D28932B453CA64B5CA8 /* libRNCamera.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 05622A2B3A2E4DBA93BA0D23 /* libRNCamera.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
94DCA5E1D7C84D118DC1E066 /* libRNGestureHandler.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CD7C0189FD94182AED36C93 /* libRNGestureHandler.a */; };
984643DE248120A5000A6140 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 984643DD248120A5000A6140 /* Launch Screen.storyboard */; };
......@@ -296,6 +297,13 @@
remoteGlobalIDString = 3D7682761D8E76B80014119E;
remoteInfo = SplashScreen;
};
98D92D6B24BD8FC400280FE9 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = AAAAD0EF95A340EBB8C14FF4 /* RNCamera.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 4107012F1ACB723B00C6AA39;
remoteInfo = RNCamera;
};
ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
......@@ -385,6 +393,7 @@
00E356EE1AD99517003FC87E /* BoneHouse_Business_APPTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BoneHouse_Business_APPTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* BoneHouse_Business_APPTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BoneHouse_Business_APPTests.m; sourceTree = "<group>"; };
05622A2B3A2E4DBA93BA0D23 /* libRNCamera.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNCamera.a; sourceTree = "<group>"; };
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* BoneHouse_Business_APP.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BoneHouse_Business_APP.app; sourceTree = BUILT_PRODUCTS_DIR; };
......@@ -414,6 +423,7 @@
9FE3EE95F749487AA78654B1 /* libSplashScreen.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libSplashScreen.a; sourceTree = "<group>"; };
A3D4AB90D45046B6BFE7C6D9 /* libRNGestureHandler-tvOS.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = "libRNGestureHandler-tvOS.a"; sourceTree = "<group>"; };
A45E12D6491A4DF4ADC867FE /* RNGestureHandler.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNGestureHandler.xcodeproj; path = "../node_modules/react-native-gesture-handler/ios/RNGestureHandler.xcodeproj"; sourceTree = "<group>"; };
AAAAD0EF95A340EBB8C14FF4 /* RNCamera.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNCamera.xcodeproj; path = "../node_modules/react-native-camera/ios/RNCamera.xcodeproj"; sourceTree = "<group>"; };
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
C3CA8CE00B9B42E8BBF11B98 /* libRNSound.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNSound.a; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
......@@ -453,6 +463,7 @@
45B67B07A6F24364958008AE /* libRNImagePicker.a in Frameworks */,
5D804E4863954EA583B5D90F /* libRNSound.a in Frameworks */,
FDA8A7E8CF7E4533BFCAF6DF /* libSplashScreen.a in Frameworks */,
82855D28932B453CA64B5CA8 /* libRNCamera.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -650,6 +661,7 @@
7FD26CBC2EA44A0AA04DCBDE /* RNImagePicker.xcodeproj */,
5AD4F6B5C99D45AFA38C9BEE /* RNSound.xcodeproj */,
2B2E7359DA4943E3940FC60E /* SplashScreen.xcodeproj */,
AAAAD0EF95A340EBB8C14FF4 /* RNCamera.xcodeproj */,
);
name = Libraries;
sourceTree = "<group>";
......@@ -697,6 +709,14 @@
name = Products;
sourceTree = "<group>";
};
98D92D6824BD8FC400280FE9 /* Products */ = {
isa = PBXGroup;
children = (
98D92D6C24BD8FC400280FE9 /* libRNCamera.a */,
);
name = Products;
sourceTree = "<group>";
};
ADBDB9201DFEBF0600ED6528 /* Products */ = {
isa = PBXGroup;
children = (
......@@ -716,6 +736,7 @@
C3CA8CE00B9B42E8BBF11B98 /* libRNSound.a */,
A3D4AB90D45046B6BFE7C6D9 /* libRNGestureHandler-tvOS.a */,
9FE3EE95F749487AA78654B1 /* libSplashScreen.a */,
05622A2B3A2E4DBA93BA0D23 /* libRNCamera.a */,
);
name = "Recovered References";
sourceTree = "<group>";
......@@ -931,6 +952,10 @@
ProjectRef = 32FB84FD02214626895950C9 /* RNAudio.xcodeproj */;
},
{
ProductGroup = 98D92D6824BD8FC400280FE9 /* Products */;
ProjectRef = AAAAD0EF95A340EBB8C14FF4 /* RNCamera.xcodeproj */;
},
{
ProductGroup = ECD74EBD2474DDFC005B4208 /* Products */;
ProjectRef = 42A609E5FD924552A85B1554 /* RNDatePicker.xcodeproj */;
},
......@@ -1193,6 +1218,13 @@
remoteRef = 9846431F248115E6000A6140 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
98D92D6C24BD8FC400280FE9 /* libRNCamera.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRNCamera.a;
remoteRef = 98D92D6B24BD8FC400280FE9 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
......@@ -1419,6 +1451,7 @@
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
"$(SRCROOT)/../node_modules/react-native-camera/ios/**",
);
INFOPLIST_FILE = BoneHouse_Business_APPTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
......@@ -1432,6 +1465,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
......@@ -1457,6 +1491,7 @@
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
"$(SRCROOT)/../node_modules/react-native-camera/ios/**",
);
INFOPLIST_FILE = BoneHouse_Business_APPTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
......@@ -1470,6 +1505,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
......@@ -1497,8 +1533,10 @@
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
"$(SRCROOT)/../node_modules/react-native-camera/ios/**",
);
INFOPLIST_FILE = BoneHouse_Business_APP/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0.2;
OTHER_LDFLAGS = (
......@@ -1528,8 +1566,10 @@
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
"$(SRCROOT)/../node_modules/react-native-camera/ios/**",
);
INFOPLIST_FILE = BoneHouse_Business_APP/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0.2;
OTHER_LDFLAGS = (
......@@ -1563,6 +1603,7 @@
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
"$(SRCROOT)/../node_modules/react-native-camera/ios/**",
);
INFOPLIST_FILE = "BoneHouse_Business_APP-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
......@@ -1575,6 +1616,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
......@@ -1608,6 +1650,7 @@
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
"$(SRCROOT)/../node_modules/react-native-camera/ios/**",
);
INFOPLIST_FILE = "BoneHouse_Business_APP-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
......@@ -1620,6 +1663,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
......@@ -1652,6 +1696,7 @@
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
"$(SRCROOT)/../node_modules/react-native-camera/ios/**",
);
INFOPLIST_FILE = "BoneHouse_Business_APP-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
......@@ -1664,6 +1709,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
......@@ -1696,6 +1742,7 @@
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-splash-screen/ios",
"$(SRCROOT)/../node_modules/react-native-camera/ios/**",
);
INFOPLIST_FILE = "BoneHouse_Business_APP-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
......@@ -1708,6 +1755,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
......
......@@ -10,6 +10,7 @@
"react": "16.8.3",
"react-native": "0.59.9",
"react-native-audio": "4.3.0",
"react-native-camera": "^2.10.2",
"react-native-date-picker": "2.7.9",
"react-native-gesture-handler": "1.3.0",
"react-native-image-picker": "0.27.0",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment