Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

framework not found FirebaseCore

I am getting the following error

ld: framework not found FirebaseCore
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have tried all the things, like cleaning, reintegrating and updating and installing the PODS, nothing seems to work. Please help. Here is my PODFILE. I have been struggling for the past 2 weeks with this crazy thing

target 'MyProject' do
  use_modular_headers!
  # use_frameworks!

  pod 'GoogleMaps'
  pod 'GooglePlaces'

  pod 'Alamofire'
  pod 'SwiftyJSON' 
  pod 'SwiftKeychainWrapper'

  pod 'FBSDKCoreKit', '4.35'
  pod 'FBSDKShareKit', '4.35'
  pod 'FBSDKLoginKit', '4.35'

  pod 'GoogleSignIn'

  pod 'Firebase/Core'
  pod 'Firebase/Auth'
  pod 'Firebase/Database'
  pod 'Firebase/Storage'
  pod 'Firebase/Crash'

  pod 'FirebaseStorageCache'

end
like image 456
A B Vijay Kumar Avatar asked Sep 03 '18 15:09

A B Vijay Kumar


1 Answers

If you look at the workspace in Xcode but cannot drill into the project from there then your issue is that your workspace is not opening properly. There should be an expand arrow next to the project name in the workspace explorer. In my case it was because the Project file was being opened by Xcode first before it was opening the Workspace. Since the project was already in use it could not be used again by the workspace. There is no appropriate error message to alert you to this situation.

To fix:

  1. Open xcode
  2. Close all projects and workspaces
  3. Close Xcode (Now the next time you open Xcode it will not open your old project first by default)
  4. Open the Workspace file

Now you should be able to drill into your Xcode project from within your workspace.

I wrestled with this problem as a noob to CocoaPods and Analytics and working with Workspaces. I had added CocoaPods and Firebase to an existing application that had not used CocoaPods before. Once you add CocoaPods you should only ever open the Xcode project through the Workspace.

FWIW: I found this link useful to understand what was going on: Xcode Project vs. Xcode Workspace - Differences

like image 122
KeithTheBiped Avatar answered Nov 15 '22 11:11

KeithTheBiped