【问题标题】:use_native_modules! skipped the react-native dependency 'react-native-beacons-manager'. No podspec file was found使用_native_modules!跳过了 react-native 依赖 'react-native-beacons-manager'。未找到 podspec 文件
【发布时间】:2020-06-08 22:22:13
【问题描述】:

Android 运行良好,但 ios 出现错误。

版本: “反应”:“16.9.0”, “反应原生”:“0.61.5”, 后续步骤:

  • npm install react-native-beacons-manager --save
  • cd ios && pod install

得到以下错误:

    use_native_modules! skipped the react-native dependency 'react-native-beacons-manager'. 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 auto-linking 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

【问题讨论】:

    标签: ios react-native


    【解决方案1】:

    看起来 react-native-beacons-manager 不支持自动链接

    react-native.config.js(在项目根目录创建此文件)

    module.exports = {
      dependencies: {
        'react-native-beacons-manager': {
          platforms: {
            ios: null
          },
        },
      },
    };
    

    并使用手动链接包

    react-native link react-native-beacons-manager
    

    【讨论】:

    • 何时使用此依赖项我得到“空值不是 Beacons.requestWhenInUseAuthorization() 中的对象;
    • 你用“Null 不是对象”解决了这个问题吗?如果是,您如何解决此问题?
    猜你喜欢
    • 2018-05-01
    • 2020-02-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-20
    • 2018-09-10
    • 2019-10-02
    相关资源
    最近更新 更多