You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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')
在 2020年1月17日,上午10:09,Luong Truong ***@***.***> 写道:
Hi @cwh11022 , any updates? I have the same issue
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Activity
jeremyzj commentedon Aug 30, 2019
1
LuongTruong commentedon Jan 17, 2020
Hi @cwh11022 , any updates? I have the same issue
cwh11022 commentedon Jan 17, 2020
yunkai909 commentedon Jan 26, 2022
1、新建react-native-smart-barcode.podspec 文件
文件内容`require 'json'
package = JSON.parse(File.read(File.join(dir, 'package.json')))
Pod::Spec.new do |s|
s.name = package['name']
s.version = package['version']
s.summary = package['description']
s.homepage = "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/react-native-component/react-native-smart-barcode"
s.license = package['license']
s.author = package['author']
s.source = { :path => '.' }
s.platform = :ios, "8.0"
s.dependency 'React-Core'
s.source_files = "ios/RCTBarcode/RCTBarcode/.{h,m}"
s.resources = ['ios/raw/']
end
2、把iOS编译报错的ScannerRect 文件删除 3、代码const BarcodeManager = Platform.OS == 'ios' ? NativeModules.Barcode : NativeModules.CaptureModule修改为const BarcodeManager = Platform.OS == 'ios' ? NativeModules.RCTBarcode : NativeModules.CaptureModule`4、从本地路径引入库