Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined is not an object (evaluating 'BarcodeManager.barCodeTypes') #46

Open
yanglingnan opened this issue Apr 22, 2019 · 4 comments
Open

Comments

@yanglingnan
Copy link

No description provided.

@yanglingnan
Copy link
Author

是编译不成功导致的吗

@12343954
Copy link

12343954 commented May 1, 2019

<Barcode style={{ flex: 1, alignSelf: 'stretch', }}
	ref={component => this._barCode = component}
	barCodeTypes={['org.iso.QRCode']}  // add this prop
	onBarCodeRead={(event) => this._onBarCodeRead(event)} />

barCodeTypes=oneOf([
0: "org.gs1.EAN-8"
1: "org.gs1.EAN-13"
2: "org.iso.Aztec"
3: "org.iso.QRCode"
4: "org.iso.PDF417"
5: "org.iso.Code128"
6: "org.iso.Code39"
7: "com.intermec.Code93"
8: "org.gs1.UPC-E"
9: "org.iso.Code39Mod43"
])

@cwh11022
Copy link

<Barcode style={{ flex: 1, alignSelf: 'stretch', }}
	ref={component => this._barCode = component}
	barCodeTypes={['org.iso.QRCode']}  // add this prop
	onBarCodeRead={(event) => this._onBarCodeRead(event)} />

barCodeTypes=oneOf([
0: "org.gs1.EAN-8"
1: "org.gs1.EAN-13"
2: "org.iso.Aztec"
3: "org.iso.QRCode"
4: "org.iso.PDF417"
5: "org.iso.Code128"
6: "org.iso.Code39"
7: "com.intermec.Code93"
8: "org.gs1.UPC-E"
9: "org.iso.Code39Mod43"
])

I add ” barCodeTypes={['org.iso.QRCode']} // add this prop “,but it also does not work。
It seems like to be short of .podspec file when I use RN0.60.4 with CocoaPods。

I am an iOS developer。My colleague maked it work On Android without CocoaPods。

@cwh11022
Copy link

On RN 0.60.4, When I cd ios directory and use "pod install"。The following prompt appears:

[!] use_native_modules! skipped the react-native dependency 'react-native-smart-barcode'. No podspec file was found.
    - Check to see if there is an updated version that contains the necessary podspec file
    - Contact the library maintainers or send them a PR to add a podspec. The react-native-webview podspec is a good example of a package.json driven
    podspec. See https://github.com/react-native-community/react-native-webview/blob/master/react-native-webview.podspec
    - If necessary, you can disable autolinking for the dependency and link it manually. See
    https://github.com/react-native-community/cli/blob/master/docs/autolinking.md#how-can-i-disable-autolinking-for-unsupported-library

And the following Error on screen when I run the demo

undefined is not an object (evaluating 'BarcodeManager.barCodeTypes')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants