我们正在使用React Native开发一款智能手机应用程序。直到上周,它一直运行良好,但突然之间,我甚至无法从前天左右开始构建它,现在我出现了以下错误:
/PRJDIR/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m:34:40: expected a type
+ (NSDictionary *)remoteMessageToDict:(FIRMessagingRemoteMessage *)remoteMessage {
/PRJDIR/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m:35:58: property 'appData' not found on object of type '__strong id'
return [self remoteMessageUserInfoToDict:remoteMessage.appData];
/PRJDIR/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingModule.m:295:29: no visible @interface for 'FIRMessaging' declares the selector 'sendMessage:to:withMessageID:timeToLive:'
[[FIRMessaging messaging] sendMessage:data to:to withMessageID:messageId timeToLive:[ttl intValue]];
^
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening PRJ.xcworkspace. Run CLI with --verbose flag for more details.
开发环境如下。
- iOS14.4(模拟器iPhone12(
- 反应:16.9.0
- 天然反应:0.61.5
- @react本地firebase/消息传递:7.4.2
- X代码:12.4(12D4e(
- node.js:12.3.1
我已经尝试了以下操作。
- @react原生firebase/messagingを7.9.2へアップグレード
- キャッシュ削除
- 节点模块とpackage-lock.jsonの削除、npm安装
- PodsとPodfile.lockの削除、吊舱安装
我担心了大约3天,但一直没能解决。。。如果你知道解决方案,请告诉我。
什么是@react原生firebase/app版本?
如果包react-native-firebase/messaging
是7.4.2版本,我认为包react-native-firebase/app
版本是8.2.0版。你可以试试这个版本。