7

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

2
  • Also have this issue. Did you manage to find a solution? Commented Jul 21, 2021 at 14:09
  • @user1356791 I have added the solution in answer below
    – Rizwan
    Commented Jul 26, 2021 at 13:31

1 Answer 1

10

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}];
3
  • this leads to multiple other errors Commented Sep 16, 2021 at 11:56
  • @DjaferAbdelhadi such as? This resolved the image display issue for me.
    – Rizwan
    Commented Sep 24, 2021 at 11:57
  • I created a patch for this issue with: yarn patch-package react-native-firebase
    – Rafa2602
    Commented Sep 28, 2021 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.