Description
[REQUIRED] Step 1: Describe your environment
- Xcode version: 11.6 (11E708)
- Firebase SDK version: 6.31.0
- Firebase Component: Analytics
- Component version: 6.8.0
- Installation method: CocoaPods
- macOS version: 10.15.6 (19G2021)
[REQUIRED] Step 2: Describe the problem
'import Firebase' is no longer sufficient to define the FirebaseApp symbol in my build environment. Using Xcode 11.6, with Firebase 6.31.0, I have to import FirebaseCore to avoid getting: "error: use of unresolved identifier 'FirebaseApp'". I was previously using Firebase 6.27.0 on this same build machine without issue when only importing Firebase.
I believe this is the same issue as #6066. The comments in that issue indicate that 'import Firebase' should be sufficient and that importing the specific component (or firebase core) is not needed. I have run through the proposed resolution in that issue (quit Xcode, remove pods dir, remove xcworkspace dir, rerun pod install, open newly created xcworkspace). This does not resolve the issue in my project.
I am able to reproduce the same issue with the QuickStart sample for analytics.
This problem does not occur on my other build machine, which has the same firebase environment, but is running Xcode 11.5 (11E608c) on macOS 10.15.4 (19E266).
Steps to reproduce:
Reproducible with QuickStart sample:
$ git clone https://github.com/firebase/quickstart-ios.git
$ cd quickstart-ios/analytics/
$ pod install --repo-update
$ open AnalyticsExample.xcworkspace
Building with the Debug configuration for physical device running iOS 13 produces:
Prepare build note: Using new build system note: Building targets in parallel note: Planning build note: Constructing build description Build target nanopb of project Pods with configuration Debug Build target Pods-AnalyticsExample of project Pods with configuration Debug Build target FirebaseCoreDiagnostics of project Pods with configuration Debug Build target PromisesObjC of project Pods with configuration Debug Build target GoogleDataTransport of project Pods with configuration Debug Build target FirebaseCore of project Pods with configuration Debug Build target AnalyticsExample of project AnalyticsExample with configuration Debug CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'AnalyticsExample' from project 'AnalyticsExample') cd /Users/user/workspaces/quickstart-ios/analytics export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk <...build removed for brevity...> /Users/user/workspaces/quickstart-ios/analytics/AnalyticsExample/AppDelegate.swift:23:5: error: use of unresolved identifier 'FirebaseApp' FirebaseApp.configure() ^~~~~~~~~~~ Build target FirebaseInstallations of project Pods with configuration Debug Build target GoogleUtilities of project Pods with configuration Debug Build failed 8/26/20, 11:45 PM 12.7 seconds
Relevant Code:
From QuickStart sample/analytics/AnalyticsExample/AppDelegate.swift:
import UIKit import Firebase @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication .LaunchOptionsKey: Any]?) -> Bool { FirebaseApp.configure() return true }