firebase-ios-sdk: import Firebase no longer works

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.0 beta 2
  • Firebase SDK version: 6.28.1
  • Firebase Component: Whole Firebase framework (Auth, Core, Database, Firestore, Messaging, Storage, etc)
  • Component version: 6.28.1
  • Installation method: CocoaPods (select one)

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

Just install firebase with some components like functions and firestore, then try to use firestore/functions with imported Firesbase.

What happened? How can we make the problem occur? This could be a description, log/console output, etc. After the update, importing Firebase in not enough to use firestore/auth/functions, it looks like import Firebase now do nothing

Zrzut ekranu 2020-07-17 o 14 32 20

But after remove import firebase, and add import for each component then it works Zrzut ekranu 2020-07-17 o 14 33 24

That is a planned change or bug?

If you have a downloadable sample project that reproduces the bug you’re reporting, you will likely receive a faster response on your issue.

Relevant Code:

import Fireabse
let functions = Functions.functions() // this case doesn't work

////
import FirebaseFunctions
let functions = Functions.functions() // this one works

so it looks like the `import Firebase` is useless since new update right?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 21 (5 by maintainers)

Most upvoted comments

i have fixed the problem :

  1. close xcode
  2. removing Pods directory
  3. removing xcworkspace directory
  4. launch pod install again
  5. open myproject.xcworkspace

i suspect that during my first pod install xcode was open

Same behaviour, Xcode Version 11.5 (11E608c).

need to import FirebaseCore otherwise FirebaseApp is not defined

Got unresolved identifier FirebaseApp; XCODE 11.6. Had to import FirebaseCrashlytics directly.

Hi all. I’m still in trouble from last week. I have tried what sdnetwork specifies, and it only works at few times. It mainly fails when working with a physical device. With the simulator it compiles well.

Firebase installed pods: pod ‘Firebase/Analytics’ pod ‘Firebase/DynamicLinks’ pod ‘Firebase/Crashlytics’ pod ‘Firebase/Messaging’ pod ‘Firebase/RemoteConfig’

log from pod install: Installing Firebase (6.28.1) Installing FirebaseABTesting (4.0.0) Installing FirebaseAnalytics (6.6.2) Installing FirebaseCore (6.9.1) Installing FirebaseCoreDiagnostics (1.5.0) Installing FirebaseCrashlytics (4.3.0) Installing FirebaseDynamicLinks (4.2.0) Installing FirebaseInstallations (1.5.0) Installing FirebaseInstanceID (4.5.0) Installing FirebaseMessaging (4.6.0) Installing FirebaseRemoteConfig (4.7.0)

XCode version: 11.6 physical device: iPhone 11 Pro iOS 13.6 CocoaPod version: 1.8.4 MacOS Catalina version: 10.15.6

Captura de Pantalla 2020-07-28 a la(s) 10 41 01

@Marcin951 and others We still haven’t been able to reproduce, so it would be really helpful to share an example that demonstrates the issue.

The other option would be to track down what is different about a working and broken environment. Perhaps, diff’ing the Pods directory would provide some clues …

Using import FirebaseDatabase fixes the issue. Is this a bug or expected behavior?

I’m pretty sure that is a bug, if they didn’t mark it as change in the changelogs. Tomorrow I’ll create a brand new project to check if that is 100% issue