setScreenName 上的 react-native 0.64.2 firebase 编译错误

时间:2021-06-17 14:08:20

标签: react-native react-native-ios react-native-firebase

Firebase 编译在 [FIRAnalytics setScreenName ...] 中的 RNFirebaseAnalytics.m 处出错

0.61

更新到 react-native 0.64.2

node_modules/react-native-firebase/ios/RNFirebase/analytics/RNFirebaseAnalytics.m:20:19: 错误:选择器 'setScreenName:screenClass:'

没有已知的类方法
[FIRAnalytics setScreenName:screenName screenClass:screenClassOverriew];

以下构建命令失败: CompileC /<PATH_TO_DERIVEDDATA>/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNFirebase.build/Objects-normal/x86_64/RNFirebaseAnalytics.o /<PROJECT_PATH>/node_modules/react-native-firebase/ios/RNFirebase/analytics/RNFirebaseAnalytics.m 普通 x86_64 Objective-c com.apple.compilers.llvm.clang.1_0.compiler

1 个答案:

答案 0 :(得分:0)

在以下文件中的节点模块

/node_modules/react-native-firebase/ios/RNFirebase/analytics/RNFirebaseAnalytics.m

更新以下代码行

[FIRAnalytics setScreenName:screenName screenClass:screenClassOverriew];

[FIRAnalytics logEventWithName:kFIREventScreenView parameters: @{kFIRParameterScreenName: screenName}];