Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

react-native 0.64.2 firebase compilation error on setScreenName

Tags:

Firebase compilation in error at [FIRAnalytics setScreenName ...] in RNFirebaseAnalytics.m

when updated to react-native 0.64.2 from 0.61

node_modules/react-native-firebase/ios/RNFirebase/analytics/RNFirebaseAnalytics.m:20:19: error: no known class method for selector 'setScreenName:screenClass:'

[FIRAnalytics setScreenName:screenName screenClass:screenClassOverriew];

The following build commands failed: 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 normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

like image 596
Rizwan Avatar asked Jun 17 '21 14:06

Rizwan


1 Answers

In Node Modules in the following file

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

Update the following line of code

[FIRAnalytics setScreenName:screenName screenClass:screenClassOverriew];

to

[FIRAnalytics logEventWithName:kFIREventScreenView parameters: @{kFIRParameterScreenName: screenName}];
like image 63
Rizwan Avatar answered Sep 26 '22 04:09

Rizwan