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

RN 0.60.4, No podspec file was found #53

Open
cwh11022 opened this issue Jul 26, 2019 · 4 comments
Open

RN 0.60.4, No podspec file was found #53

cwh11022 opened this issue Jul 26, 2019 · 4 comments

Comments

@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')

Thanks!!!

@jeremyzj
Copy link

1

@LuongTruong
Copy link

Hi @cwh11022 , any updates? I have the same issue

@cwh11022
Copy link
Author

cwh11022 commented Jan 17, 2020 via email

@BestKai
Copy link

BestKai commented 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 = "https://github.com/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、从本地路径引入库

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

4 participants