RNFirebaseNotifications.h 迁移到 firebase v6 后未找到。反应本机

RNFirebaseNotifications.h not found after migrating to firebase v6. React Native

我也正在迁移到新版本的 RN 和 firebase。我按照 firebase v6 的迁移指南中所写的进行了所有操作,但现在 xcode 显示错误 'RNFirebaseNotifications.h' file not found and RNFirebaseMessaging.h 找不到文件。由于 RN > 0.60 使用自动链接,这可能是 xcode 找不到所需模块的原因吗? 如果您知道如何解决该问题,请告诉我。 我的 package.json

"dependencies": {
"@react-native-community/async-storage": "^1.7.1",
"@react-native-community/netinfo": "^5.0.1",
"@react-native-firebase/app": "^6.2.0",
"@react-native-firebase/messaging": "^6.2.0",
"@tinkoff/utils": "^1.0.2",
"buffer": "^5.2.1",
"connected-react-navigation": "^0.0.4",
"formik": "^1.5.2",
"jetifier": "^1.6.4",
"moment": "^2.22.2",
"react": "16.9.0",
"react-dom": "^16.8.6",
"react-native": "0.61.5",
}

不幸的是,我在 firebase github 页面上没有找到任何解决方案:(

在显示错误的文件中尝试 @import Firebase;

RNFirebaseMessaging.h file not found

从我第一次问这个问题到现在已经过了很长时间,无论如何,从 v6 开始,firebase 自己实现了所有与消息传递相关的东西,所以从 v6 开始,开发人员不需要手动添加 RNFirebaseMessaging import到 AppDelegate。如果您遇到相同的错误,只需从文件中删除所有出现的 RNFirebaseMessaging 即可。看看here