错误消息-无法在iOS上本地找到RNFirebase核心模块 [英] Error message - RNFirebase core module was not found natively on iOS

查看:61
本文介绍了错误消息-无法在iOS上本地找到RNFirebase核心模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

React Native Firebase不会安装在iOS React Native项目上.它在Android上运行良好.

我遵循了这条指令. https://rnfirebase.io/docs/v5.xx/installation/initial-设置我设置了Firebase,通过XCode添加了下载的plist文件,然后安装并设置了Cocoapod.

当我将以下行添加到App.js时,模拟器将返回错误消息.

 从'react-native-firebase'导入firebase; 

错误消息:"iOS本身未找到RNFirebase核心模块"

我已经尝试了一些从该论坛中获得的东西: https://github.com/invertase/react-native-firebase/issues/614

我从Podfile中注释了以下几行

  use_frameworks! 

然后安装Pod,更新Pod

在Xcode上,选中"Build Phases/Link Binary with Libraries"部分.我检查了libRNFirebase.a已经在那里.

我已经不停地尝试这个问题了几个月了.而且我还没有找到在iOS项目上安装React Native Firebase的方法.任何指针将不胜感激.

解决方案

我目前正在维护react-native-firebase v5分支(当前稳定),由于某些原因,我们现在的标头搜索路径确实存在问题

我没有确定的修复程序,但是我构建了一个从react-native init开始的演示,然后安装react-native-firebase,并执行所有必要的操作,以便该项目可以在iOS甚至是iOS上构建和运行存档处于发布模式.

您可能会在这里看到它: https://github.com/mikehardy/rnfbdemo

目前唯一重要的事情是,您需要按照所有安装说明在Podfile中放入一个未记录的内容,作为最后一个 end 之前的最后一行.>

 系统("mkdir -p Pods/Headers/Public/FirebaseCore&& cp Pods/FirebaseCore/Firebase/Core/Public/* Pods/Headers/Public/FirebaseCore/") 

React Native Firebase won’t install on iOS React Native project. It works fine on Android.

I followed this instruction. https://rnfirebase.io/docs/v5.x.x/installation/initial-setup I set up Firebase, added the downloaded plist file via XCode, installed and set up Cocoapod.

The moment I add the following line to my App.js, the simulator returns an error message.

  import firebase from 'react-native-firebase';

The error message: "RNFirebase core module was not found natively on iOS"

I’ve tried a few things I picked up from this forum: https://github.com/invertase/react-native-firebase/issues/614

I commented out following lines from Podfile

use_frameworks!

And then pod install, pod update

on Xcode, checked the Build Phases/ Link Binary with Libraries section. I checked libRNFirebase.a was already there.

I've been trying this for a few months now on and off. And I haven't found a way to make React Native Firebase install on iOS project. Any pointer would be much appreciated.

解决方案

I'm currently maintaining the react-native-firebase v5 branch (current stable) and we do have a problem with the header search paths right now for some reason.

I don't have a definitive fix, but I constructed a demo that goes from react-native init, then installs react-native-firebase, and does all the things necessary such that the project builds and runs on iOS and even archives in release mode.

You may see it here: https://github.com/mikehardy/rnfbdemo

The only thing that is important at the moment is that you need to put one non-documented thing in your Podfile after following all the install instructions, as the last line before the final end

  system("mkdir -p Pods/Headers/Public/FirebaseCore && cp Pods/FirebaseCore/Firebase/Core/Public/* Pods/Headers/Public/FirebaseCore/")

这篇关于错误消息-无法在iOS上本地找到RNFirebase核心模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆