3

I have tried every possible answer on this site but none of them have worked. I have added a pod file but after I import Firebase, I keep getting the (No such module 'Firebase') error

Here is the code of my appDelegate

// // AppDelegate.swift // Firebase app // // Created by Karan Singh on 11/21/19. // Copyright © 2019 Karan Singh. All rights reserved. // import UIKit import Firebase @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { FirebaseApp.configure() return true } // MARK: UISceneSession Lifecycle func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) { // Called when the user discards a scene session. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } } 

and here is what my pod file looks like

# Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'Firebase app' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! # Pods for Firebase app # add the Firebase pod for Google Analytics pod 'Firebase/Analytics' # add pods for any other desired Firebase products # https://firebase.google.com/docs/ios/setup#available-pods pod 'Firebase/Auth' end 

I am still learning coding in Xcode - thank you for helping me out with this!

4
  • Try building the project... Commented Nov 21, 2019 at 9:33
  • Add pod 'Firebase/Core Commented Nov 21, 2019 at 9:33
  • 1
    Firebase/Core is deprecated and not necessary. Commented Nov 21, 2019 at 14:45
  • Might need to do a build to prime the Xcode module cache. Commented Nov 21, 2019 at 14:45

1 Answer 1

3

as Hurobaki commented,You have to add firebase/core in podfile like this:

# Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'FirebaseApp' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Add the Firebase pod for Google Analytics pod 'Firebase/Analytics' pod 'Firebase/Core' pod 'Firebase/Messaging' pod 'Firebase/Auth' end 
Sign up to request clarification or add additional context in comments.

2 Comments

FirebaseOSX is ancient. See github.com/firebase/firebase-ios-sdk#macos-and-tvos for the current recommended OSX approach.
Firebase/Core is now deprecated. Only need to use Firebase/Analytics now, to get core functionality, since analytics is the core functionality

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.