firebase-ios-sdk: Apple Mach-O Linker (ld) Error Group

  • Xcode version: Xcode 9.0 (9A235) (GM version)
  • Firebase SDK version: Firebase 4.1.1
  • Library version: _____
  • Firebase Product: core, crash

Step 3: Describe the problem

At build generate error Apple Mach-O Linker (ld) Error Group

ld: warning: directory not found for option '-F/Users/me/Library/Developer/Xcode/DerivedData/My App-cbbpbhsjrtvjwkakgwmzqckliizs/Build/Products/Debug-iphoneos/GoogleToolboxForMac'
ld: warning: directory not found for option '-F/Users/me/Library/Developer/Xcode/DerivedData/My App-cbbpbhsjrtvjwkakgwmzqckliizs/Build/Products/Debug-iphoneos/Protobuf'
ld: warning: directory not found for option '-F/Users/me/Library/Developer/Xcode/DerivedData/My App-cbbpbhsjrtvjwkakgwmzqckliizs/Build/Products/Debug-iphoneos/nanopb'
ld: framework not found GoogleToolboxForMac
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Steps to reproduce:

  1. Create a project and with CocoaPods define a Podfile:
source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '9.0'
use_frameworks!

target 'My App' do
  pod 'Firebase/Analytics'
  pod 'Firebase/Crash'
end
  1. Install pods
$ pod --version
1.3.1
$ pod install
Analyzing dependencies
Downloading dependencies
Installing Firebase (4.1.1)
Installing FirebaseAnalytics (4.0.3)
Installing FirebaseCore (4.0.6)
Installing FirebaseCrash (2.0.1)
Installing FirebaseInstanceID (2.0.2)
Installing GoogleToolboxForMac (2.1.1)
Installing Protobuf (3.4.0)
Installing nanopb (0.3.8)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use `My App.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 9 total pods installed.
  1. Build the app

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 24 (6 by maintainers)

Most upvoted comments

Here is the simple solution friends.

For cocoapods you have to use the xcode workspace file not the xcode project file

Here’s what worked for me: remove the affected pod (for me it was firebase) from your podfile run pod install put the removed pods back into the podfile again run pod install. Clean and rebuild your project!

Would this be suitable for your needs?

No. We will not, just for Firebase, have a special process. If you do not support Carthage very soon Firebase will be removed from our projects.

@morganchen12 I know this ticket. I even tried to help you by providing you a link on a tutorial for cross platform framework and Carthage support.

The removal of CocoaPods is in progress… tic tac tic tac ⏳

@TofPlay Good find! Thanks for tracking it down and sharing!

Do you know how Find Implicit Dependencies got unchecked? It seems to always checked by default on project creation.

I used workspace already not the xcode project I also done pod deintegrate, rm -rf Pods/ Podfile.lock *.xcworkspace followed by pod install to regenerate the workspace. That doesn’t changed anything.