Frankenstein
Frankenstein

Reputation: 16341

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).

Upvotes: 5

Views: 2119

Answers (1)

Paul Beusterien
Paul Beusterien

Reputation: 29572

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.

Upvotes: 8

Related Questions