Skip to content

Commit 8c5d242

Browse files
Merge branch 'develop'
2 parents ef45117 + effd488 commit 8c5d242

File tree

8 files changed

+308
-75
lines changed

8 files changed

+308
-75
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
.DS_Store
Lines changed: 102 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
# OSX
2-
#
3-
.DS_Store
4-
51
# Xcode
6-
#
7-
build/
2+
!**/*.xcodeproj
3+
!**/*.pbxproj
4+
!**/*.xcworkspacedata
5+
!**/*.xcsettings
6+
!**/*.xcscheme
87
*.pbxuser
98
!default.pbxuser
109
*.mode1v3
@@ -20,40 +19,106 @@ DerivedData
2019
*.hmap
2120
*.ipa
2221
*.xcuserstate
22+
project.xcworkspace
23+
**/.xcode.env.local
24+
25+
# Gradle
26+
/build/
27+
/packages/react-native-gradle-plugin/build/
28+
/packages/rn-tester/build
29+
/packages/rn-tester/android/app/.cxx/
30+
/packages/rn-tester/android/app/build/
31+
/packages/rn-tester/android/app/gradle/
32+
/packages/rn-tester/android/app/gradlew
33+
/packages/rn-tester/android/app/gradlew.bat
34+
/ReactAndroid/build/
35+
/ReactAndroid/.cxx/
36+
/ReactAndroid/gradle/
37+
/ReactAndroid/gradlew
38+
/ReactAndroid/gradlew.bat
39+
/ReactAndroid/hermes-engine/build/
40+
/ReactAndroid/hermes-engine/.cxx/
41+
/template/android/app/build/
42+
/template/android/build/
43+
44+
# Buck
45+
.buckd
46+
buck-out
47+
/.lsp.buckd
48+
/.lsp-buck-out
49+
/ReactAndroid/src/main/jni/prebuilt/lib/
50+
/ReactAndroid/src/main/gen
51+
52+
# Android Studio
53+
.project
54+
.settings
55+
.classpath
56+
57+
# Watchman
58+
.watchmanconfig
2359

24-
# Android/IntelliJ
25-
#
26-
build/
60+
# Android
2761
.idea
2862
.gradle
2963
local.properties
3064
*.iml
65+
/android/
66+
67+
# Node
68+
node_modules
69+
*.log
70+
.nvm
71+
/bots/node_modules/
72+
package-lock.json
73+
74+
# OS X
75+
.DS_Store
76+
77+
# Test generated files
78+
/ReactAndroid/src/androidTest/assets/AndroidTestBundle.js
79+
*.js.meta
80+
81+
/coverage
82+
/third-party
83+
84+
# Root dir shouldn't have Xcode project
85+
/*.xcodeproj
86+
87+
# ReactCommon subdir shouldn't have Xcode project
88+
/ReactCommon/**/*.xcodeproj
89+
90+
# Libs that shouldn't have Xcode project
91+
/Libraries/FBLazyVector/**/*.xcodeproj
92+
/Libraries/RCTRequired/**/*.xcodeproj
93+
/React/CoreModules/**/*.xcodeproj
94+
/React/FBReactNativeSpec/**/*.xcodeproj
95+
/packages/react-native-codegen/**/*.xcodeproj
96+
97+
# Ruby Gems (Bundler)
98+
/vendor
99+
/template/vendor
100+
101+
# iOS / CocoaPods
102+
/template/ios/build/
103+
/template/ios/Pods/
104+
/template/ios/Podfile.lock
105+
/packages/rn-tester/Gemfile.lock
106+
107+
# Ignore RNTester specific Pods, but keep the __offline_mirrors__ here.
108+
/packages/rn-tester/Pods/*
109+
!/packages/rn-tester/Pods/__offline_mirrors__
110+
111+
# react-native-codegen
112+
/React/FBReactNativeSpec/FBReactNativeSpec
113+
/packages/react-native-codegen/lib
114+
/ReactCommon/react/renderer/components/rncore/
115+
/packages/rn-tester/NativeModuleExample/ScreenshotManagerSpec*
116+
117+
118+
119+
# Visual studio
120+
.vscode
121+
.vs
31122

32-
# node.js
33-
#
34-
node_modules/
35-
npm-debug.log
36-
yarn-error.log
37-
38-
# BUCK
39-
buck-out/
40-
\.buckd/
41-
*.keystore
42-
!debug.keystore
43-
44-
# fastlane
45-
#
46-
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47-
# screenshots whenever they are needed.
48-
# For more information about the recommended setup visit:
49-
# https://docs.fastlane.tools/best-practices/source-control/
50-
51-
*/fastlane/report.xml
52-
*/fastlane/Preview.html
53-
*/fastlane/screenshots
54-
55-
# Bundle artifact
56-
*.jsbundle
57-
58-
# CocoaPods
59-
/ios/Pods/
123+
# Android memory profiler files
124+
*.hprof

BarcodeReaderSimpleSample/App.js

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
import React from 'react';
2-
import {Button, View} from 'react-native';
2+
import {Button, StyleSheet, View} from 'react-native';
33
import {NavigationContainer} from '@react-navigation/native';
44
import {createNativeStackNavigator} from '@react-navigation/native-stack';
55
import BarcodeScanner from './BarcodeScanner';
6-
import {DynamsoftBarcodeReader} from 'dynamsoft-capture-vision-react-native';
6+
import {DCVBarcodeReader} from 'dynamsoft-capture-vision-react-native';
77

8-
function HomeScreen({navigation}) {
9-
(async () => {
10-
// Initialize the license so that you can use full feature of the Barcode Reader module.
11-
try {
12-
await DynamsoftBarcodeReader.initLicense('DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTEwMTIwMDkzNiIsIm9yZ2FuaXphdGlvbklEIjoiMjAwMDAxIn0=');
13-
} catch (e) {
14-
console.log(e);
15-
}
16-
})();
8+
(async () => {
9+
// Initialize the license so that you can use full feature of the Barcode Reader module.
10+
await DCVBarcodeReader.initLicense(
11+
'DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTEwMTIwMDkzNiIsIm9yZ2FuaXphdGlvbklEIjoiMjAwMDAxIn0=',
12+
).catch(e => {
13+
console.log(e);
14+
});
15+
})();
1716

17+
function HomeScreen({navigation}) {
1818
return (
19-
<View style={{flex: 1, alignItems: 'center', justifyContent: 'center'}}>
19+
<View style={styles.contentView}>
2020
<Button
2121
title="Start Scanning"
2222
onPress={() => navigation.navigate('Barcode')}
@@ -38,4 +38,13 @@ function App() {
3838
);
3939
}
4040

41+
const styles = StyleSheet.create({
42+
contentView: {
43+
flex: 1,
44+
alignItems: 'center',
45+
justifyContent: 'center',
46+
flexDirection: 'column',
47+
},
48+
});
49+
4150
export default App;

0 commit comments

Comments
 (0)