Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FirebasePerformance SDK warns that FirebaseAnalytics should be included #7487

Closed
kaganriedel opened this issue Feb 9, 2021 · 2 comments · Fixed by #7600 or #7914
Closed

FirebasePerformance SDK warns that FirebaseAnalytics should be included #7487

kaganriedel opened this issue Feb 9, 2021 · 2 comments · Fixed by #7600 or #7914

Comments

@kaganriedel
Copy link

kaganriedel commented Feb 9, 2021

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.4
  • Firebase SDK version: 7.5
  • Installation method: CocoaPods
  • Firebase Component: Performance, though I also have Crashlytics installed.

[REQUIRED] Step 2: Describe the problem

Firebase.h generates a warning when FirebasePerformance is included but FirebaseAnalytics isn't included in the project. This contradicts the SDK's documentation.

The table in this section does not list Analytics as required for the Performance SDK. Additionally my experience so far has been that the Performance SDK has been working just fine without Analytics included.

Steps to reproduce:

  1. Include the Firebase Performance SDK in a project that does not include the Analytics SDK.
  2. In case it matters, I installed the SDK using CocoaPods and also have the Crashlytics SDK included in the project.
  3. Build the app.
  4. Note the warning "FirebaseAnalytics.framework is not included in your target. Please add the \ FirebaseAnalytics dependency to your project to ensure Firebase Performance works as intended."

Relevant Code:

It seems like these lines are incorrect and should be removed, or the documentation in the SDK is incorrect.

  #if __has_include(<FirebasePerformance/FirebasePerformance.h>)
    #import <FirebasePerformance/FirebasePerformance.h>
    #if TARGET_OS_IOS && !__has_include(<FirebaseAnalytics/FirebaseAnalytics.h>)
      #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING
        #warning "FirebaseAnalytics.framework is not included in your target. Please add the \
FirebaseAnalytics dependency to your project to ensure Firebase Performance works as intended."
      #endif // #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING
    #endif
  #endif
@paulb777
Copy link
Member

Reopening. This still occurs in 7.8.0 because of the FirebasePerformance dependency RemoteConfig. It reproduces in the performance quickstart after removing Analytics from the Podfile

@paulb777
Copy link
Member

Firebase 8 will eliminate all the build time warnings from Firebase.h about the missing Analytics frameworks.

@firebase firebase locked and limited conversation to collaborators May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.