2

I recently attempted to add Firebase to my application. Using Cocoapods I did a

pod init 

and a

pod install 

here is my Podfile:

 # Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'A' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for A pod ‘Firebase’ end 

And when trying to build my application I get the following error:

Apple Mach-O Linker Error Group

Ld /Users/jordanfrancis/Library/Developer/Xcode/DerivedData/A-dpnxkkawmymjqihivnbvuskouynh/Build/Products/Debug-iphonesimulator/A.app/A normal x86_64 cd /Users/jordanfrancis/Desktop/A export IPHONEOS_DEPLOYMENT_TARGET=10.2 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk -L/Users/jordanfrancis/Library/Developer/Xcode/DerivedData/A-dpnxkkawmymjqihivnbvuskouynh/Build/Products/Debug-iphonesimulator -F/Users/jordanfrancis/Library/Developer/Xcode/DerivedData/A-dpnxkkawmymjqihivnbvuskouynh/Build/Products/Debug-iphonesimulator -F/Users/jordanfrancis/Library/Developer/Xcode/DerivedData/A-dpnxkkawmymjqihivnbvuskouynh/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac -F/Users/jordanfrancis/Desktop/A/Pods/FirebaseAnalytics/Frameworks/frameworks -F/Users/jordanfrancis/Desktop/A/Pods/FirebaseCore/Frameworks/frameworks -F/Users/jordanfrancis/Desktop/A/Pods/FirebaseInstanceID/Frameworks/frameworks -F/Users/jordanfrancis/Desktop/A/Pods/GoogleInterchangeUtilities/Frameworks/frameworks -F/Users/jordanfrancis/Desktop/A/Pods/GoogleSymbolUtilities/Frameworks/frameworks -filelist /Users/jordanfrancis/Library/Developer/Xcode/DerivedData/A-dpnxkkawmymjqihivnbvuskouynh/Build/Intermediates/A.build/Debug-iphonesimulator/A.build/Objects-normal/x86_64/A.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=10.2 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/jordanfrancis/Library/Developer/Xcode/DerivedData/A-dpnxkkawmymjqihivnbvuskouynh/Build/Intermediates/A.build/Debug-iphonesimulator/A.build/Objects-normal/x86_64/A_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/jordanfrancis/Library/Developer/Xcode/DerivedData/A-dpnxkkawmymjqihivnbvuskouynh/Build/Intermediates/A.build/Debug-iphonesimulator/A.build/Objects-normal/x86_64/A.swiftmodule -ObjC -lc++ -lsqlite3 -lz -framework AddressBook -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseInstanceID -framework GoogleInterchangeUtilities -framework GoogleSymbolUtilities -framework GoogleToolboxForMac -framework StoreKit -framework SystemConfiguration -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/jordanfrancis/Library/Developer/Xcode/DerivedData/A-dpnxkkawmymjqihivnbvuskouynh/Build/Intermediates/A.build/Debug-iphonesimulator/A.build/A.app.xcent -framework Pods_A -Xlinker -dependency_info -Xlinker /Users/jordanfrancis/Library/Developer/Xcode/DerivedData/A-dpnxkkawmymjqihivnbvuskouynh/Build/Intermediates/A.build/Debug-iphonesimulator/A.build/Objects-normal/x86_64/A_dependency_info.dat -o /Users/jordanfrancis/Library/Developer/Xcode/DerivedData/A-dpnxkkawmymjqihivnbvuskouynh/Build/Products/Debug-iphonesimulator/A.app/A

ld: warning: directory not found for option '-F/Users/jordanfrancis/Library/Developer/Xcode/DerivedData/A-dpnxkkawmymjqihivnbvuskouynh/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac' ld: framework not found GoogleToolboxForMac clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am using Swift 3.0

Any suggestions? Cheers

3 Answers 3

9

I found the solution just as I posted this question...

You must use the .xcworkspace file after pod install instead of .xcodeproj file.

In order to do so open the location of your project in finder, then open the .xcworkspace file with Xcode (this file was create by Cocoa Pods).

Sign up to request clarification or add additional context in comments.

5 Comments

What do you mean? I used "open project_name.xcworkspace" but still see this error.
This does't work for me either. @Tien Do, did you find any other response elsewhere you would like to share here?
ditto what everyone has said.
Solved my problem.! Thanks! But .xcodeproj file error will not stop me upload to app store right? and error also will not effect my project right?
And I have to use .xcworkspace upload to itunes connect?
0

I just encountered the same issue with my new project, after trying many things, I finally solve my issue by updating my pods :

pod update Installing Firebase 4.7.0 (was 4.1.1) Installing FirebaseAnalytics 4.0.5 (was 4.0.3) Installing FirebaseCore 4.0.12 (was 4.0.6) Installing FirebaseInstanceID 2.0.7 (was 2.0.2) Installing GoogleToolboxForMac 2.1.3 (was 2.1.1) 

Clean your project from Xcode, also (if not sufficient) clear the Library -> Developer -> Xcode-> DerivedData folder and try to rebuild your project.

Comments

-6

Try this instead in terminal:

  • git status
  • git branch
  • git add -A
  • git commit -m ‘’Your comment...’’
  • git push origin (Your branch name)

2 Comments

Git has absolutely nothing to do with asked question.
Why talking about Git in a CocoaPods issue ? O_o

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.