RN 0.63.4 - null 不是一个对象 - Beacons.requestWhenInUseAuthrization

问题描述

当我使用“react-native-beacons-manager”库时出现以下错误

RN 版本:0.63.4 平台:iOS iOS:14

我设置了一个新应用并添加了“react-native-beacon-manager”库。

重现步骤 react-native init MyBeaconTest npm install --save react-native-beacon-manager 在我的“App.js”中添加以下代码

import React,{Component} from 'react';
import {
  View,Text,} from 'react-native';
import Beacons        from 'react-native-beacons-manager';

export default class App extends Component {

  // Componente wurde geladen
  componentwillMount() {
    Beacons.requestWhenInUseAuthorization();
  }

  render() {
    return (
        <View><Text>123123123</Text></View>
    );
  }
};

我收到以下错误

Error

我做错了什么?我应该手动链接库吗?我必须将库添加到 xcode 项目中吗?如果是,我该怎么做。 在 React-Native 0.63.4 中启用了自动链接

我已经尝试运行“pod install”。但没有区别。我必须在 podfile 中添加一个条目吗?

感谢您的帮助。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)