Hi im trying to build my app for flutter and the compiler returns back an error:
Command MergeSwiftModule failed with a nonzero exit code
/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_analytics-7.1.1/ios/Classes/FLTFirebaseAnalyticsPlugin.m:49:19: error: no known class method for selector 'setScreenName:screenClass:'
[FIRAnalytics setScreenName:screenName screenClass:screenClassOverride];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have tried to google as much as i can but i dont know why else it is not working
my flutter is in the latest version on channel stable: 2.2.3
I have tried
-flutter clean
-pod update
-pod install –repo-update
-pod install
-sudo gem install cocoapods
Please help out i will try to supply any other information required. Thank you
3
Answers
If same error is occurring in react-native then
in RNFirebaseAnalytics.m file, update following line of code:
to
I was facing the same issue in RNFirebaseAnalytics.m file, update the following line of code:
[FIRAnalytics setScreenName:screenName screenClass:screenClassOverriew];
to :-
[FIRAnalytics logEventWithName :kFIREventScreenView parameters: @{kFIREventScreenView: screenName}];