Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I remove firebase warning and console message regarding Firebase/Analytics and swizzing respectively?

Wonder why firebase throws a warning saying that I've not included Firebase/Analytics while I don't need it. I'm using Firebase/Messaging though. And I know messaging is working as intended. So, how would I remove the warning that says:

<MyProjectPath>/Pods/Firebase/CoreOnly/Sources/Firebase.h:75:10: "FirebaseAnalytics.framework is not included in your target. Please add Firebase/Analytics to your Podfile or add FirebaseAnalytics.framework to your project to ensure Firebase Messaging works as intended."

Xcode warning

  1. I do not wish to add FirebaseAnalytics to my project.
  2. I do not wish to edit the pod.

Also, every time I run my project the console keeps showing me a message regarding method_swizzling_in_firebase_messaging.

console screenshot

  1. I do not wish to change the existing push-notification implementation to manual.
  2. I do not wish to set OS_ACTIVITY_MODE to NO (it gives me other info that I need).
like image 943
Frankenstein Avatar asked Jul 15 '20 16:07

Frankenstein


People also ask

How do I remove firebase Analytics?

Permanently deactivate collection If you need to deactivate Analytics collection permanently in a version of your app, set FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED to YES (Boolean) in your app's Info. plist file .

What is firebase alert?

Firebase Cloud Messaging (FCM) provides a reliable and battery-efficient connection between your server and devices that allows you to deliver and receive messages and notifications on iOS, Android, and the web at no cost.

How does firebase messaging work?

Firebase Cloud Messaging: Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost. Using FCM, you can notify a client app that new email or other data is available to sync. You can send notification messages to drive user re-engagement and retention.


1 Answers

Disable the warning by defining the preprocessor define FIREBASE_ANALYTICS_SUPPRESS_WARNING in the build:

enter image description here

Messaging works fine without Analytics, but provides additional features when Analytics is added.

The log message is a notice and you can adjust the level of Firebase messages that print to the console with setLoggerLevel. See details here.

like image 188
Paul Beusterien Avatar answered Sep 27 '22 21:09

Paul Beusterien