Skip to content

RN 0.60.4, No podspec file was found #53

Description

@cwh11022

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!!!

Activity

  1. jeremyzj commented on Aug 30, 2019

    @jeremyzj

    1

  2. LuongTruong commented on Jan 17, 2020

    @LuongTruong

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

  3. cwh11022 commented on Jan 17, 2020

    @cwh11022
    Author
  4. yunkai909 commented on Jan 26, 2022

    @yunkai909

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions