错误消息 - 在 iOS 上本机找不到 RNFirebase 核心模块

Error message - RNFirebase core module was not found natively on iOS

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

我遵循了这个指示。 https://rnfirebase.io/docs/v5.x.x/installation/initial-setup 我设置了 Firebase,通过 XCode 添加了下载的 plist 文件,安装并设置了 Cocoapod。

当我将以下行添加到我的 App.js 时,模拟器 returns 出现错误消息。

  import firebase from 'react-native-firebase';

错误消息:“在 iOS 上本地找不到 RNFirebase 核心模块”

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

I commented out following lines from Podfile

use_frameworks!

然后是pod安装,pod更新

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

我断断续续地尝试了几个月。而且我还没有找到在 iOS 项目上安装 React Native Firebase 的方法。任何指针将不胜感激。

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

我没有确定的修复方法,但我构建了一个演示,从 react-native 初始化开始,然后安装 react-native-firebase,并完成所有必要的事情,以便项目构建和运行在 iOS 甚至在发布模式下存档。

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

目前唯一重要的是,在按照所有安装说明进行操作后,您需要在 Podfile 中添加一个 non-documented 内容,作为最终 end[ 之前的最后一行=13=]

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